React-native-firebase: "Loading dependency graph, done."

Created on 1 Sep 2018  路  5Comments  路  Source: invertase/react-native-firebase

Environment

  1. Application Target Platform:
  • Both
  1. Development Operating System:

macOS High Sierra 10.13.6

  1. Build Tools:

Xcode 9.4.1

  1. React Native version:

react-native-cli: 2.0.1
react-native: 0.55.4

  1. React Native Firebase Version:

    "react-native-firebase": "^4.3.6",

  2. Firebase Module:

auth, database

  1. Are you using typescript?

no


My project can never get past Loading dependency graph, done.

I rolled back to a previous version when it was working and reinstalled node_moduels with yarn, but it didn't help.

So I then tried starting from scratch, but the same happens with a completely blank react-native-firebase-starter (into which I imported my previous firebase project's credentials).

Note that it works fine when using a blank create-react-native-app app

Terminal shows the following output indefinitely (I've waited for up to 40 minutes):

Scanning folders for symlinks in /Users/dillon/Dropbox/Code/Projects/react-native-firebase-starter/node_modules (22ms)

...

Running Metro Bundler on port 8081.                       

...

Looking for JS files in
   /Users/dillon/Dropbox/Code/Projects/react-native-firebase-starter 


Metro Bundler ready.

Loading dependency graph, done.

The simulator never opens. If I try opening the simulator first and then running yarn start, the simulator doesn't change at all (or even open expo). Opening expo manually doesn't do anything either.

This has happened once before, and I managed to fix it. I believe it was from installing watchman (which I hadn't had installed globally with brew yet)

Here are the fixes I've tried so far, (mostly one at a time, and then rolling back changes):

  1. deleting and reinstalling watchman with brew
  2. watchman watch-del-all after each attempt at bundling
  3. updating node
  4. reinstalling cocoapods
  5. putting various things in my Podfile that stackoverflow suggested
  6. rm -rf node_modules && yarn
  7. `npm start -- --reset-cache
  8. react-native run-ios (this generates a ton of new files in the ios/ folder, but works initially, until I try to add an import statement of any module (evenimport firebase from 'firebase') in any of my js files and it throws an error on the ios simulator screen that it can't find the module. I can do this again to get that error for you if you'd like me to).
  9. react-native upgrade
  10. remove /usr/local/var/run/watchman/ then brew reinstall the watchman
  11. make sure 127.0.0.1 localhost is in your /etc/hosts file. (it already was)
  12. make sure you aren't using a VPN
  13. uninstall watchman and yarn start
  14. restart computer -___-
  15. Erase all content and settings on xcode simulator
  16. enter http://localhost:8081/index.ios.bundle into the browser resulted in the following output in browser window:

{"message":"Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]","name":"NotFoundError","type":"NotFoundError","status":404,"errors":[{"description":"Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]"}],"stack":"NotFoundError: Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]\n at DependencyGraph.getAbsolutePath (/Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/node-haste/DependencyGraph.js:317:11)\n at /Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:280:416\n at Generator.next (<anonymous>)\n at step (/Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:11:445)\n at /Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:11:605\n at process._tickCallback (internal/process/next_tick.js:68:7)"}

package.json:

{
  "name": "monitor",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "babel-jest": "^23.4.0",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "detox": "^8.2.3",
    "fs-extra": "^6.0.1",
    "jest": "^23.5.0",
    "react-test-renderer": "^16.4.1",
    "replace-in-file": "^3.4.0"
  },
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "rename": "node ./bin/rename.js",
    "start": "react-native start",
    "test": "jest"
  },
  "jest": {
    "preset": "react-native"
  },
  "detox": {
    "text-runner": "jest",
    "runner-config": "e2e/config.json",
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/monitor.app",
        "build": "xcodebuild -workspace ios/monitor.xcworkspace -scheme monitor -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 7"
      }
    }
  },
  "dependencies": {
    "etherscan-api": "^8.1.2",
    "fbjs": "^0.8.17",
    "react": "^16.3.2",
    "react-native": "^0.55.3",
    "react-native-firebase": "^4.3.6",
    "react-navigation": "^2.12.1"
  }
}
Build Error Duplicate

All 5 comments

Duplicate of https://github.com/invertase/react-native-firebase-starter/issues/51 - please don't duplicate these 馃槴

I had the same issue while building Android

this was the solution for me: https://stackoverflow.com/questions/52111298/how-to-solve-app-launch-app-is-stuck-on-white-screen

If you're getting this loading error while running 'react-native run-ios' or building through xcode then try 'react-native run-android' after connecting an android device to your pc.
If not happening try deleting node-modules and 'npm install'.

I just figured out we should open two terminals in the first we should run
yarn run start PORT=8081
in the second
react-native run-android

I just figured out we should open two terminals in the first we should run
yarn run start PORT=8081
in the second
react-native run-android

omg, that's finally worked

Was this page helpful?
0 / 5 - 0 ratings