-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Packager] Packager does not start after upgrading to NPM 3.0 beta #1758
Comments
This happens because the packager is looking for react-native's dependencies in its own node_modules directory. In npm 3, all dependencies install flat in the top level node_modules. https://github.com/facebook/react-native/blob/master/packager/packager.js#L18 I'd love to start using npm3 - will look into a PR. |
This happens for |
I just had this issue with react-native 0.6.0 and npm 2.13.0. The issue went away by upgrading to react-native 0.7.1 but there's probably a simpler solution |
@fatuhoku - not sure where you read that, npm 3 is not required for the new release, iojs is 😄 We don't support npm 3 yet, help from the community on that would be great! |
+1 for this issue. require statements should be updated to not include npm packages via relative paths. |
+1 hit this too would a simple require check be good enough ? A simple way to detect this would be to try to require some dep and throw the error if it was missing. |
Its the framework trying to be too smart. These lines are merely checking to see if |
Another +1 for this issue. I'm on npm 3.3.3 and node 4.1.0. |
I've been using my Pull Request since I submitted it with no problems so far. It's a simple seeming change so hopefully they can merge it soon and be done with this.
Its not even that complicated since it already does that. Like I said, it merely tests for |
+1. Same on node 4.0.0 and npm 3.3.3 |
@eddiemonge I'm not sure how to use that PR because I'm not sure where the react-native files are... I should be able to just edit the matching file right? |
One way to work around this temporarily is to downgrade npm by running |
+1. This is pretty troublesome. |
The packager will be moved out into its own repo in the near future, and supporting npm 3 can happen then. |
Yeah, the resolution algorithm of the packager needs to be upgraded for npm 3. Also, sadly |
I've tested this on npm 3 and looks like the dependency resolution system works fine. I'll remove the check that makes |
Hi |
+1 |
2 similar comments
+1 |
+1 |
I have node v4.0 and npm v3.3.4 and this issue also affects me. |
+1 |
1 similar comment
+1 |
+1 |
solved this problem with
|
+1 @nashpro I tried that, still got the same error. Just to confirm here's the output of
Running node 4.1.1 with npm 3.3.4 |
+1 |
1 similar comment
+1 |
same story, fixed it by downgrading npm to version 2.14.6 |
+1 |
same story have some solution? |
I can confirm @didierstockmans fix works. I downgraded npm to 2.14.6 and ran it without issue. I then upgraded to react-native 0.11.4 and it still works. Still running node 4.1.1. |
Downgrading is not a fix for this specific problem. There is a fix in daba142 but it hasn't been released yet. You could install master from this repo and use that |
daba142 will go out in 0.13 soon. |
@eddiemonge sorry I meant work around. Lol. |
@mkonicek unfortunately it's not the only issue. It introduces naming collisions because it takes |
Interesting, maybe @spicyj might know about react-tools? |
immutable lists react-tools only as a dev dependency so |
Ok, fair enough :) Might be coming from a different package then. I definitely don't get the |
(Eventually RN will depend on |
👍 nice! |
This works with simple RN projects. External npm packages might cause trouble -- so if you encounter issues please test with a basic RN project with no extra dependencies. |
Downgrading the npm@2.14.6 works for me. |
PATH: [Your Project]/node_modules/react-native/package/packager.js |
+1 |
1 similar comment
+1 |
After upgrading to NPM 3.0 beta (https://github.com/npm/npm/releases/tag/v3.0.0), I re-installed the
node_modules
throughnpm install
in my React Native project. Everything showed up in the file system, but after callingnpm start
I get the error:No matter how often I call
npm install
andnpm start
, the error persists.This happens for me with both
0.6.0
and0.7.0-rc
.The text was updated successfully, but these errors were encountered: