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

Updated path in module-postlink.js for android & ios core builds in version 0.59 of RN. #8

Closed
wants to merge 1 commit into from

Conversation

coreyphillips
Copy link
Contributor

Version 0.59 of RN breaks module-postscript.js due to the new location of the ios & android core builds. This PR updates the path to the new location, resolving the issue.

@jaimecbernardo jaimecbernardo self-requested a review March 14, 2019 15:22
@jaimecbernardo
Copy link
Member

Hi @coreyphillips , Thank you for the PR. I'll give it a try.

@jaimecbernardo
Copy link
Member

Hi @coreyphillips , I've given it a try, and I still get:

Error: Cannot find module './../../../node_modules/@react-native-community/cli/build/core/android

Tried it with react-native 0.59.0 and 0.59.1.

@unmec
Copy link

unmec commented Mar 16, 2019

The latest RN extracted cli, so we need first install it:

npm install --save react-native-cli

The latest cli has a different path, we need actually modify module-postlink.js with:

const android = require('./../../../node_modules/@react-native-community/cli/build/tools/android');
const ios = require('./../../../node_modules/@react-native-community/cli/build/tools/ios');

Then link the package, it should now work as expected.

@jaimecbernardo
Copy link
Member

Hi @unmec ,

Thank you for the additional information.
Using your suggested path works.
Will prepare a release with it after some more testing.

@jaimecbernardo
Copy link
Member

The location from this PR didn't work for any of my tests, so I'm closing this.
Ended up using the path suggested by @unmec and include a path to keep older react-native versions working: ba9d5d4

This was released in https://www.npmjs.com/package/nodejs-mobile-react-native/v/0.3.4

Thanks @coreyphillips and @unmec for your help.

softdevjs7 added a commit to softdevjs7/nodejs-mobile-react-native that referenced this pull request Sep 30, 2022
Updates the postlink script paths to use the new local cli location
from react-native 0.59.

Ref: JaneaSystems/nodejs-mobile-react-native#8
Thanks: https://github.com/coreyphillips
Thanks: https://github.com/unmec
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

Successfully merging this pull request may close these issues.

4 participants