cannot find entry file index.ios.js [index.android.js] in any of the roots
There are a lot of people on the web searching for this problem, and the solution is:
Run under Project path: NPM Start---Reset-cache
Restart Project: React-native Run-ios (run-android)
If it's still a failure then it's here to see if there's a solution NPM modules get required from/users/node_modules/instead of the project directory
I also encountered this problem, that is, node_modules all the dependent file directory has become/users/this form, workaround: Delete node_modules:rm-rf node_modules && npm Install clear Watchman:watchman watch-del-all npm cache clean && NPM Install
If it's still a failure, then it's here to see if there's a solution.
If it doesn't work out, then I guess you're using cnpm install instead of NPM install?
Or are you using NPM install?
Both of these installations can cause problems, especially cnpm. Don't use it here.
The recommended way is: yarn
Set up an Taobao image for NPM:
NPM Config Set registry https://registry.npm.taobao.org--global
npm config set Disturl https://npm.taobao.org/dist --global
Install YARN:NPM Install Yarn-g
Set up Taobao mirror for yarn:
Yarn Config Set registry https://registry.npm.taobao.org--global
Yarn config set Disturl https://npm.taobao.org/ Dist--global
Re-use the command yarn instead of NPM install, and then restart the RN project, there should be no error. reactcomponenttreehook.purgeunmountedcomponents is not a function
In fact, if the report of this error, you can estimate the installation of dependency when you have seen a warning: react-native@0.48.4 "has incorrect peer dependency" react@16.0.0-alpha.12. But you ignored it, The solution is to modify the version of the react you are installing now as a hint:
Yarn Add react@16.0.0-alpha.12 No bundle URL present. Make sure you ' re running a packager server or have included a. jsbundle file in your application.
This error is an error message that is ejected by the emulator red screen:
Xcode or command-line prompt error is: third-party/glog-0.3.4/src/base/mutex.h:105:10:fatal error: ' config.h ' file not found, search the solution:
Delete the Ios/build path, and then React-native Run-ios
No use, then the second option:
Delete the Node_modules/third-party and then react-native Run-ios again
But my node_modules didn't have this plugin at all, so I used the easiest way to do it: Delete the entire node_modules directory and then reuse the yarn command to install it, and finally fix it.