Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native link react-native-oauth fails on Windows #50

Open
Cleanshooter opened this issue Jan 18, 2017 · 6 comments
Open

react-native link react-native-oauth fails on Windows #50

Cleanshooter opened this issue Jan 18, 2017 · 6 comments

Comments

@Cleanshooter
Copy link

It seems the addition of the prelink and postlink rnpm commands to the json.package prevent Windows users from using this tool. The shell scripts you have written are not windows env compatible and cause rnpm-install to crash. I'll see if I can write a fix for this.

rnpm-install ERR! It seems something went wrong while linking. Error: spawn UNKNOWN
Please file an issue here: https://github.com/facebook/react-native/issues

spawn UNKNOWN
@Cleanshooter
Copy link
Author

Removing the following from package.json allows linking to complete succesfuly.

  "rnpm": {
    "commands": {
      "prelink": "node_modules/react-native-oauth/bin/prepare.sh",
      "postlink": "node_modules/react-native-oauth/bin/cocoapods.sh"
    },
    "ios": {
      "project": "ios/OAuthManager.xcodeproj"
    },
    "android": {
      "packageInstance": "new OAuthManagerPackage()"
    }
  },

https://github.com/Cleanshooter/react-native-oauth

Not really a solution but a work around for now... I guess. I'm not experienced enough with npm packages to figure out how to run shells from Windows CMD so this library would be more cross compatible.

@gbenga504
Copy link

Nice.... That worked for me also

@roshkins
Copy link

roshkins commented Mar 2, 2017

I had the same issue, and the workaround worked! Could executing .sh files under Bash on Ubuntu on Windows work?

@Cleanshooter
Copy link
Author

Yeah your best best for this to work as is might be to run it in a docker container or something...

@KeanuTomatoMomotaro
Copy link

@Cleanshooter i tried the solution and it linking was successful, however i was unable to build and run the application as I got the following error:

Execution failed for task ':react-native-oauth:compileReleaseJavaWithJavac'.

@jinz11
Copy link

jinz11 commented Jan 6, 2019

manually removed this section will cause app failed to generate apk due to verify release resource step failed. I think should update this changes on repo instead of remove it manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants