react-native: [0.45.0] new app setup fails "bundling: Error at DependencyGraph._getAbsolutePath"
react-native init testApp cd testApp react-native run-ios
yields:
error: bundling: Error at DependencyGraph._getAbsolutePath (/Users/nilspoltoraczyk/Desktop/temp/testApp/node_modules/react-native/packager/src/node-haste/DependencyGraph.js:280:11) at DependencyGraph.getDependencies (/Users/nilspoltoraczyk/Desktop/temp/testApp/node_modules/react-native/packager/src/node-haste/DependencyGraph.js:218:26) at Resolver.getDependencies (/Users/nilspoltoraczyk/Desktop/temp/testApp/node_modules/react-native/packager/src/Resolver/index.js:107:27) at /Users/nilspoltoraczyk/Desktop/temp/testApp/node_modules/react-native/packager/src/Bundler/index.js:591:37 at Generator.next (<anonymous>) at step (/Users/nilspoltoraczyk/Desktop/temp/testApp/node_modules/react-native/packager/src/Bundler/index.js:12:445) at /Users/nilspoltoraczyk/Desktop/temp/testApp/node_modules/react-native/packager/src/Bundler/index.js:12:605 at <anonymous> at process._tickCallback (internal/process/next_tick.js:169:7) Bundling index.ios.js 0.0% (0/1), failed.
OSX 10.11.6
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 9
- Comments: 20 (2 by maintainers)
I got it to work by starting the packager with
npm run start -- --reset-cache.But you have to reset the cache each time you close it.
I am seeing the same problem after upgrading to react-native 0.45. But my error message is slightly different:
NotFoundError: Cannot find entry file build/app/app.ios.js in any of the roots: ["<omitted>/client/node_modules/react-native"]That might be the reason why @aparedes’s
npm run start -- --reset-cachedidn’t work for me. Using--rootas suggested here did work, though:npm run start -- --root <directory_with_your_react_component_js_sources>Getting the same error for run-ios and run-android. Looking for JS files in <project-route>/node_modules/react-native/packager instead of <project-root>
npm start works ok
Issue resolved for me.
The react-native launched new release 0.45 a few days back. So, the commands to create a react-native application and running locally have many differences.
npm install -g create-react-native-app Then run the following commands to create a new React Native project called “AwesomeProject”:
the new way of creating a react-native application as follows
create-react-native-app AwesomeProjectPlease follow the official documentation for creating an application and running the application on locally. hope the below link will help you. https://facebook.github.io/react-native/docs/getting-started.html
Once you’ve set these up, you can launch your app on an Android Virtual Device by running
npm run android, or on the iOS Simulator by runningnpm run ios(macOS only).Enjoy, Happy coding 😃
I’m having this issue as well. @aparedes’s advice is getting me by for now, but it’s annoying having to run that command every time I want to launch my app.
macOS: 10.12.5 (16F73)