8

I tried to add push notifications to my app with https://github.com/evollu/react-native-fcm module. I end up with lots of errors and run many react commands on node including uprade commands. Now on simulator red screen says "Can not find entry file index.js in any of to roots" and when I look at the ReactPackager it says:

Loading dependency graph, done. Bundlingindex.js[development, non-minified] 0.0% (0/1), failed. error: bundling failed: Error at DependencyGraph._getAbsolutePath (/Users/beratuslu/Desktop/react-native-starter-app/node_modules/metro-bundler/src/node-haste/DependencyGraph.js:305:11) at DependencyGraph.getDependencies (/Users/beratuslu/Desktop/react-native-starter-app/node_modules/metro-bundler/src/node-haste/DependencyGraph.js:283:4236) at Resolver.getDependencies (/Users/beratuslu/Desktop/react-native-starter-app/node_modules/metro-bundler/src/Resolver/index.js:129:5) at /Users/beratuslu/Desktop/react-native-starter-app/node_modules/metro-bundler/src/Bundler/index.js:642:39 at Generator.next (<anonymous>) at step (/Users/beratuslu/Desktop/react-native-starter-app/node_modules/metro-bundler/src/Bundler/index.js:13:1336) at /Users/beratuslu/Desktop/react-native-starter-app/node_modules/metro-bundler/src/Bundler/index.js:13:1496 at process._tickCallback (internal/process/next_tick.js:103:7)

enter image description here

Here is my package.json: https://pastebin.com/2CsXCyJt

Any help appreciated...

4
  • can you provide your package.json please Commented Oct 12, 2017 at 20:24
  • I added my package.json Commented Oct 13, 2017 at 13:49
  • 1
    try upgrading "babel-preset-react-native": "3.0.1", and make sure your .babelrc contains` "presets": ["react-native"]` I faced such issue it had to do with something relate to babel libraries in my dev dependencies so i deleted babel related libraries and kept only babel-preset-react-native and babel-jest Commented Oct 13, 2017 at 15:15
  • Guys check the mentioned link here Commented Jun 4, 2018 at 8:53

2 Answers 2

10

From react native 0.49.1 there is a breaking change, Merge your index.android.js and index.ios.js into index.js. For more details see this issue in Github

Sign up to request clarification or add additional context in comments.

Comments

0

You can just try the following steps

  1. (in project directory) mkdir android/app/src/main/assets
  2. react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
  3. react-native run-android

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.