When I run a fresh react native project I get the following error. I already changed node version from 6.10 to 7.8. Maybe this has something to do with the latest rc2 update (found under releases) ? Another rc2 project a few days ago ran without any problems.
run
react-native init rn45rc2 --version 0.45.0-rc.2
go into the test project
cd rn45rc2
run i.e. iOS version
react-native run-ios

React packager ready.
Loading dependency graph, done.
error: bundling: Error
at DependencyGraph._getAbsolutePath (/Users/worker/development/rn45rc2/node_modules/react-native/packager/src/node-haste/DependencyGraph.js:280:11)
at DependencyGraph.getDependencies (/Users/worker/development/rn45rc2/node_modules/react-native/packager/src/node-haste/DependencyGraph.js:218:26)
at Resolver.getDependencies (/Users/worker/development/rn45rc2/node_modules/react-native/packager/src/Resolver/index.js:107:27)
at /Users/worker/development/rn45rc2/node_modules/react-native/packager/src/Bundler/index.js:591:37
at Generator.next (<anonymous>)
at step (/Users/worker/development/rn45rc2/node_modules/react-native/packager/src/Bundler/index.js:12:445)
at /Users/worker/development/rn45rc2/node_modules/react-native/packager/src/Bundler/index.js:12:605
at process._tickCallback (internal/process/next_tick.js:109:7)
Bundling `index.ios.js` 0.0% (0/1), failed.
{
"name": "rn45rc2",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.45.0-rc.2"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-preset-react-native": "1.9.2",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
When I run the packenger in another terminal first from the root folder via
npm run start
and than
react-native run-ios
The problem goes away. Still, react-native run-ios seems not to start the packager properly.
I too was banging my head with this most of yesterday...
I wonder will 0.44.4 be available via npm anytime soon?
Only up to 0.44.2 is available.
npm show react-native versions --json
I can see 0.45.0-rc.2, but I can't get it to work.
Also having this issue with the newly released 0.45.0, starting the packager manually does seem to be a workaround but it's far from ideal.
Same problem upgrading from 0.44.2 to 0.45.0
Same problem. react-native run-ios is broken on 0.45.0. need to start the packager by npm start
i have same problem how to fix it
Still the same on 0.46.0-rc.0 (released a few hours ago)
I just deleted the app on my simulator and ran react-native run-ios again. it's now working. I've also cleaned all the cache:
watchman watch-del-all
rm -rf node_modules && npm install
npm start -- --reset-cache
not sure if it's related
@ethanyanjiali thx it work's for me
@ethanyanjiali Worked for me as well, thanks so much! :)
@ethanyanjiali WORKS!! after 2 hours lol thank you!!
Hi there!
The packager no longer lives in this repo. It now lives in https://github.com/facebook/metro-bundler. The reasoning for the split is explained here: https://github.com/facebook/react-native/issues/13976.
If you're still interested in pursuing this issue, please open an issue on that repo! :)
Thanks!
-Adam
Most helpful comment
Possible hint for Solution Aproach
When I run the packenger in another terminal first from the root folder via
npm run startand than
react-native run-iosThe problem goes away. Still,
react-native run-iosseems not to start the packager properly.