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

npm starts hangs on 'Loading dependency graph, done.' #16798

Closed
mikeborozdin opened this issue Nov 12, 2017 · 57 comments
Closed

npm starts hangs on 'Loading dependency graph, done.' #16798

mikeborozdin opened this issue Nov 12, 2017 · 57 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@mikeborozdin
Copy link

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 8.9.1
Yarn: Not Found
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 2.3 AI-162.3871768

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.3 => 0.50.3

Steps to Reproduce

(Write your steps here:)

  1. react-native init MyApp
  2. cd MyApp
  3. npm start

Expected Behavior

  1. The browser opens with my app

Actual Behavior

  1. Nothing happens
@comeonbuddy
Copy link

I have the same issue here :(

@EladZemingo
Copy link

Me too

@Gokul-11
Copy link

I got the same problem, anyone suggested me any solution

@anerivala
Copy link

Having the same Problem!!!

@adamchenwei
Copy link

same problem

@adamchenwei
Copy link

why for 30 days no one care lol, btw I am using create-react-native-app

@ervinne13
Copy link

solved this by not bothering with npm start but using yarn start instead

@HDaghash
Copy link

same issue

@adamchenwei
Copy link

actually realize its NOT hanging, its running, you just need to run the simulator also in the root level lololol

@DiegoFelipe
Copy link

same issue with me

@gdbhosale
Copy link

@adamchenwei What exactly to do ? Can you elaborate. I am new to React Native.

@adamchenwei
Copy link

@goodok21
Copy link

@adamchenwei so, what is next? now running two windows: the terminal and the iOS emulator. that, the wise man, the councils were over?

@goodok21
Copy link

in terminal in root of the project:
react-native upgrade - it generates 'IOS' and 'Android' folders again
react-native link
react-native run-ios

@adamchenwei
Copy link

@goodok21 something similar to react-native run-ios --simulator="iPhone 4s"

@goodok21
Copy link

@adamchenwei something similar to lol what?

@adamchenwei
Copy link

sorry, what I meant is that you should be able to run this command in your root, so your simulator can be initiated,and your project gets to load into the simulator. React Native does NOT produce a browser version testable app (so far I know), ReactXP does though, but, that's another story.

@adamchenwei
Copy link

@alande-amorim
Copy link

@ervinne13 's answer did the trick for me

@ghost
Copy link

ghost commented Feb 2, 2018

I have same issue:
OS :Ubuntu 16.04 LTS
Memmory:7.3GiB
OS type:64-bit
i also installed java,node with npm,
then-- install:
sudo npm install -g react-native-cli
react-native init Sample
react-native run-android
react-native start
after these code showing

"Looking for JS files in
/mnt/20C8E761C8E73426/React native/Sample
Metro Bundler ready.
Loading dependency graph, done."
not working.....

@imranparuk
Copy link

Also having this issue

@goodok21
Copy link

goodok21 commented Feb 8, 2018

@thedanielvogelsang

react-native init MyApp
cd MyApp
yarn
react-native run-ios

or ‘react-native run-android’

@jass-trix
Copy link

try to disable remote JS Debugging
it works for me :/
it seems it has already running but the simulator doesn't respond

@samcorcos
Copy link
Contributor

I deleted node_modules, ran npm i again, then react-native run-ios and it worked fine.

@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to ContributeWhat to Expect from Maintainers

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon. labels Feb 24, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 24, 2018
@TETRA2000
Copy link
Contributor

TETRA2000 commented Feb 24, 2018

Same thing happened to me. (v0.53.3)
But after I reinstalled watchman, it resolved. 😺

@angelomichel
Copy link

Same issue here too.

Tried removing/reinstalling watchman, the watchmen watch-del-all, removing node_modules and npm i again, rebooting macos. It started failing when I tried installing a dependency (npm), I removed/reverted that code but I can never run my app any more...

Everyone has different solutions to the issue, but none worked for me

@saravanakumargn
Copy link

saravanakumargn commented Apr 8, 2018

Make sure in Wifi is Turned on in Android & iOS emulator

@gersonmontenegro
Copy link

I've did all the things that you describe before, and nothing happened. For now, is not an option for me stop my project, so I run
react-native run-android
or
react-native run-ios
and the project run directly on the device in a good way, but the debugging part is painful, but at least is a real option.

@salesawy1
Copy link

I have the same issue, and I'm using Windows 10, so I can't run the iOS emulator

@gersonmontenegro
Copy link

I don't know you can run the app in a iOS emulator from Windows, usually is not possible.

@diegosiao
Copy link

Make sure localhost is included as an exception in NSAppTransportSecurity in Info.plist file of the iOS project.

        <key>NSAppTransportSecurity</key>
	<dict>
		<key>NSExceptionDomains</key>
		<dict>
			<key>localhost</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
		</dict>
	</dict>

@bbing
Copy link

bbing commented May 25, 2018

if you've tried everything but still not worked , reboot your computer

@mic-kul
Copy link

mic-kul commented Jun 2, 2018

Had same problem, finally when tried to start it on the real device realised that I need to update my iOS version:
react-native run-ios --device "iPhone" # with connected device
resulted in following error:

]  iPhoneConnect: ## Unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=601 "Could not locate device support files." UserInfo={DeviceType=iPhone9,3, NSLocalizedDescription=Could not locate device support files., NSLocalizedRecoverySuggestion=This iPhone 7 (Model 1660, 1778, 1779, 1780) is running iOS 11.3.1 (15E302), which may not be supported by this version of Xcode.}) 

Matching versions of XCode and iOS did the job 🎉

@kevinNejad
Copy link

I recommend use Yarn instead of npm.
in most of the cases, removing your node-modules folder and reinstalling and rebuilding your project may fix the problem.
Make sure you reset your cache and clear your watchman as well.
you can even try clean your project in XCode and build it using XCode.

@RedEarthBlueSky
Copy link

To echo samcorcos delete the node_modules folder and npm i worked for me

@Fuseteam
Copy link

wait does that mean it doesn't work with npm start?

@enjeyw
Copy link

enjeyw commented Jun 27, 2018

None of the above fixes worked for me, but I noticed on my android device there was actually an error message to the effect of
Native module [NAME] tried to override [NAME] for module name [OTHER NAME] .
Googling this led me to a different issue, where the suggested fix was to go to the MainApplication.java file (in android/app/src/main/java/com/appname) and remove any duplicate imports and overides. This fixed the problem :)

@dvdobrovolskiy
Copy link

same issue

hangs on
Loading dependency graph, done.

even in absolutely new sample (react-360 init test)

@yahyaIT
Copy link

yahyaIT commented Aug 20, 2018

Same issue here

@Asinox
Copy link

Asinox commented Aug 20, 2018

Just reinstall Watchman

@Joaquimdcp
Copy link

Same issue here

@samiede
Copy link

samiede commented Sep 5, 2018

Any updates on this?
Strangely, for me it works in the genymotion emulator, after I've pointed it to the right adb folder, I just really really prefer the official emulator.

@mrabdullahsahin
Copy link

I also had the same problem. After ejecting a project on React Native, I typed "npm start" and it said "loading dependency graph, done" and stayed like that. But after typing "npm run ios" instead of "npm start" my problem was solved. iOS simulator and metro bundler run successfully.

@Fuseteam
Copy link

Fuseteam commented Sep 6, 2018

that's not solving, that a work around using the ios simulator
the issue remains "npm start" doesn't work

@MrgSub
Copy link

MrgSub commented Sep 25, 2018

Basically, from what I see, this happens after ejecting or building your iOS
You won't be able to use npm start, you will need to build and run the app on a simulator.
You won't have livereload as an option so rip

Correct me if I'm wrong.

@geek-ibrar
Copy link

Was facing the same issue, just run
watchman watch .
and then
react-native start

it worked for me :)

@thefakhreddin
Copy link

@adamchenwei
you're a true lifesaver. txn in adv.

@williscool
Copy link

williscool commented Oct 17, 2018

Leaving this here for future self if working on a react app with windows subsystem for linux (wsl).

So you can't run react-native start-android because the deploying of the android app will fail (java path is wrong and a whole host of other things)

BUT YOU CAN

Build the app with android studio deploy it to your emulator or phone then

run react-native start

The Loading dependency graph, done

Message means ... THE SERVER IS RUNNING!

Everything is good you just need to make sure adb is running in windows and

adb reverse tcp:<PORT> tcp:<PORT>

Then you can run your app.

(Also if you get a blank white screen in the app on your phone just kill the app and do the shake to reload thing. You'll know its working when the app finally makes a request to the react-native server on your laptop)

But here is my ask to the react native team.

Can ya pls have a better server is ready message lol?

P.S one more note. react-native seems to require watchman to run. otherwise react-native start will get stuck at

Loading dependency graph

minus the , done part (see why I'm pleading for a better server has started message? )

the only way I could consistently get that working on wsl is

watchman -f --log-level=1 --logfile=/tmp/why-the-funk-isn-watchman-working.log

Because it often hangs and you need to know if it has done that. only way to tell is to try kill the watchman process and restart it...

if you can't... you have to restart your computer! YAY ( there is some weird file system watcher bug the wsl guys haven't nailed down yet)

but these incantations work if you try them hard enough

@pblUSA
Copy link

pblUSA commented Nov 26, 2018

Weird. I had the same issue when running on device and on emulator. I got it resolved by double tapping 'r' while on the emulator. Doesn't really seem like a reasonable fix (not sure why the yarn start hangs after Loading dependency graph, done.)but you can try if that works

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

@vdaranyi
Copy link

vdaranyi commented Feb 9, 2019

This solved it for me: https://www.youtube.com/watch?v=Z_JH9_ZMj-M

@Saad9624
Copy link

okay so it is because when you create or start a server it changes its ip first you have to confirm the ip address of your system and then put it into the in app dev setting host address
hopes its work for all

@facebook facebook locked as resolved and limited conversation to collaborators Feb 24, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests