-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
npm_module config gets required from /Users/node_modules instead of ./node_modules #3975
Comments
I'm getting this issue with any NPM module I try to use. |
+1 - all requires of node_modules appear broken. Update: I attempted to recreate this issue with a vanilla project and was unable to. So there's something about an active project config that's breaking the packager. I'll continue investigating on my end. |
👍 seeing this too |
Interestingly, I'm only seeing this behavior with firebase right now. I can require redux and associated modules without a problem. |
I have a fix. Sadly it makes no sense. I uinstalled firebase, reinstalled, tried installing a different version, restarted xcode - nothing worked. But the following steps DID work:
Then everything worked normally. |
Wow that's annoying. Later I will try your solution with other npm packages. Btw great job @jmreidy, really appreciated. |
Hey everyone, can you all try:
And let me know if that fixes the issue? |
@skevy I just created a new test repo, recreated the bug, and then ran your commands. That fixed the issue in the test repo! |
@skevy doesn't work for me... still the same error |
Hi guys, I am also getting this error when using jsdom-jscore (or jsdom/jsdom-little)
I have tried the steps from both comments by @skevy and @jmreidy but no luck. I have also completely removed node, nvm and npm from my mac and then reinstalled following the steps on the react-native setup guide (using latest node and npm@2). Then reinstalled node_modules in project (I had removed them before setting up node), but still the same error |
I'm having the same problem with numerous packages. I start working on a new project and it works. I bring in a new package and it randomly stops working and I start getting the same error looking in users/node_modules. Does not matter which package. I start a new project and add the package it is complaining about and it works. I am new to node, but have been playing with react-native for last couple of weeks and always run into this issue. |
@julipur do you have the solution? |
@Casy Not really. If I stop everything and git clone my project into a new folder and then npm install, it works. That's the workaround that I've been doing. This does sound like some sort of caching issue. If I understand correctly the solution by @skevy above in the thread would solve the caching issue, but that has not worked for me. |
i've got this problem too. just started after updating react-native:0.17.0-rc to 0.17.0, although that might not be related (Downgrading back to 0.17.0-rc doesn't fix it) |
also, on my machine, the tmp files weren't named try running |
Closing in favor of #4968 . Let's track it there. |
Node js have group of possible folders that can contain modules. When you install one module sometimes module can be dependent to other modules. You have to install this dependancies manual. For example if the error is like /Users/node_modules/module you have to install "npm install -S module". It is showing error as missing path in /Users/node_modules because this is the last element of array full with possible paths that can contain modules (for MAC). Full list of paths by OS : https://www.npmjs.com/package/npm-paths |
who can help me to resolve this question !??? |
When requiring config :
which is included in
package.json
as:apparently react-native is searching in the wrong folder:
The text was updated successfully, but these errors were encountered: