Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Loading dependency graph, done." #1448

Closed
dillon opened this issue Sep 1, 2018 · 5 comments
Closed

"Loading dependency graph, done." #1448

dillon opened this issue Sep 1, 2018 · 5 comments
Labels
impact: build-error Behaviour causing build failure resolution: duplicate

Comments

@dillon
Copy link

dillon commented Sep 1, 2018

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 (even import 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"
  }
}
@Salakar Salakar added resolution: duplicate impact: build-error Behaviour causing build failure labels Sep 1, 2018
@Salakar
Copy link
Contributor

Salakar commented Sep 1, 2018

Duplicate of invertase/react-native-firebase-starter#51 - please don't duplicate these 😫

@Salakar Salakar closed this as completed Sep 1, 2018
@JacekRojek
Copy link

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

@Jopaul07
Copy link

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'.

@mohmdalfaha
Copy link

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

@leleuvilela
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: build-error Behaviour causing build failure resolution: duplicate
Projects
None yet
Development

No branches or pull requests

6 participants