-
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
Unable to resolve module *any* #14996
Comments
@DLevai94 Just to clarify, do you use yarn or npm? |
@seanyusa npm. Yes, I am restarting. As I think this issue is related mostly to package managing. Sometimes when I install X dependency by I think the root of this problem sits on the very deep of the bundle, packaging system of RN. |
I'm having what appears to be the same/similar issue. I have 0.45.1 projects I created a week or so ago where everything works fine, but now when I try to create projects: react-native: react-native-cli: 2.0.1, react-native: 0.46.3 All I do is run:
I've also tried it where I install babel-core before i try run-ios. I've also tried react-native run-android, but same error. I've tried the solutions it suggests, as well as what DLevai94 mentioned, but nothing works. |
Just tried with npm version 3.10.10 and I no longer got the "Unable to resolve module" error. Also tried with node v8.2.0 and npm 5.3.0 and it worked. So for me maybe it had to do with the version of npm I used or its compatability with the version of node? |
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
@hramos Thanks for taking care of it! I found a temporary solution if anyone has this problem. It's maybe a problem of the package system. After you initialize a new RN project, at the end of the fist npm install prints this message: Added 1 package, removed 628 (or some large number). It deletes a lot of packages. This solves the problem when it appears: I think if you use yarn, there's no error. Or after a I hope I helped. There are a lot of issues opened about this problem, if you can link them to this comment, it will work for them too. 👍 |
If I install any package and import it, the packager stops with this Exception all the time.
There are some tips for what should I do, but it isn't working. Every time, I get this error, I trying all of the commands (below on screenshot) and
react-native-git-upgrade
,npm cache clean --force
,npm cache verify
,yarn cache clean
in various order but it's a magic how it works... It's get resolved by one of these commands or all of them, or the order matters or who knows. The error magically disappears about 1-2 HOURS of trying.It's really annoying that neither me or my team can not work when this error appears and as I search for it, I saw that this issue isn't resolved and it was an issue in 2015 too.
Many developers have tried a lot of possible solutions, but nobody can not solve it and it isn't depend on npm, node, react, react native, or any tool/package version.
Environment
react-native -v
:react-native-cli: 2.0.1 react-native: 0.43.2
node -v
:v8.1.3
npm -v
:5.2.0
yarn --version
(if you use Yarn):0.27.5
Target Platform: iOS & Android
Development Operating System: macOS Sierra 10.12.5
Build tools: Doesn't matter. With cli, xcode, and android studio.
Steps to Reproduce
react-native init AppName
npm install any-dependency
react-native run-ios || run-android
Expected Behavior
Just compile, build and run my app.
Actual Behavior
The text was updated successfully, but these errors were encountered: