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

Comments

@mikeborozdin
Copy link

@mikeborozdin mikeborozdin commented Nov 12, 2017

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

This comment has been minimized.

Copy link

@comeonbuddy comeonbuddy commented Nov 13, 2017

I have the same issue here :(

@EladZemingo

This comment has been minimized.

Copy link

@EladZemingo EladZemingo commented Nov 13, 2017

Me too

@Gokul-11

This comment has been minimized.

Copy link

@Gokul-11 Gokul-11 commented Nov 28, 2017

I got the same problem, anyone suggested me any solution

@anerivala

This comment has been minimized.

Copy link

@anerivala anerivala commented Nov 29, 2017

Having the same Problem!!!

@adamchenwei

This comment has been minimized.

Copy link

@adamchenwei adamchenwei commented Dec 9, 2017

same problem

@adamchenwei

This comment has been minimized.

Copy link

@adamchenwei adamchenwei commented Dec 9, 2017

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

@ervinne13

This comment has been minimized.

Copy link

@ervinne13 ervinne13 commented Dec 17, 2017

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

@HDaghash

This comment has been minimized.

Copy link

@HDaghash HDaghash commented Dec 18, 2017

same issue

@adamchenwei

This comment has been minimized.

Copy link

@adamchenwei adamchenwei commented Dec 18, 2017

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

@DiegoFelipe

This comment has been minimized.

Copy link

@DiegoFelipe DiegoFelipe commented Dec 29, 2017

same issue with me

@gdbhosale

This comment has been minimized.

Copy link

@gdbhosale gdbhosale commented Dec 29, 2017

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

@adamchenwei

This comment has been minimized.

Copy link

@adamchenwei adamchenwei commented Dec 30, 2017

@goodok21

This comment has been minimized.

Copy link

@goodok21 goodok21 commented Dec 31, 2017

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

@goodok21

This comment has been minimized.

Copy link

@goodok21 goodok21 commented Dec 31, 2017

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

This comment has been minimized.

Copy link

@adamchenwei adamchenwei commented Dec 31, 2017

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

@goodok21

This comment has been minimized.

Copy link

@goodok21 goodok21 commented Dec 31, 2017

@adamchenwei something similar to lol what?

@adamchenwei

This comment has been minimized.

Copy link

@adamchenwei adamchenwei commented Dec 31, 2017

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.

@alande-amorim

This comment has been minimized.

Copy link

@alande-amorim alande-amorim commented Jan 2, 2018

@ervinne13 's answer did the trick for me

@ghost

This comment has been minimized.

Copy link

@ghost 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

This comment has been minimized.

Copy link

@imranparuk imranparuk commented Feb 8, 2018

Also having this issue

@goodok21

This comment has been minimized.

Copy link

@goodok21 goodok21 commented Feb 8, 2018

@thedanielvogelsang

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

or ‘react-native run-android’

@jass-trix

This comment has been minimized.

Copy link

@jass-trix jass-trix commented Feb 8, 2018

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

@samcorcos

This comment has been minimized.

Copy link
Contributor

@samcorcos samcorcos commented Feb 20, 2018

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

@react-native-bot

This comment has been minimized.

Copy link
Collaborator

@react-native-bot react-native-bot commented Feb 24, 2018

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

@TETRA2000

This comment has been minimized.

Copy link
Contributor

@TETRA2000 TETRA2000 commented Feb 24, 2018

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

@saravanakumargn

This comment has been minimized.

Copy link

@saravanakumargn saravanakumargn commented Apr 8, 2018

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

@gersonmontenegro

This comment has been minimized.

Copy link

@gersonmontenegro gersonmontenegro commented Apr 30, 2018

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.

@Chipped1

This comment has been minimized.

Copy link

@Chipped1 Chipped1 commented May 6, 2018

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

@gersonmontenegro

This comment has been minimized.

Copy link

@gersonmontenegro gersonmontenegro commented May 7, 2018

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

@diegosiao

This comment has been minimized.

Copy link

@diegosiao diegosiao commented May 19, 2018

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

This comment has been minimized.

Copy link

@bbing bbing commented May 25, 2018

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

@mic-kul

This comment has been minimized.

Copy link

@mic-kul 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

This comment has been minimized.

Copy link

@kevinNejad kevinNejad commented Jun 7, 2018

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

This comment has been minimized.

Copy link

@RedEarthBlueSky RedEarthBlueSky commented Jun 19, 2018

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

@Fuseteam

This comment has been minimized.

Copy link

@Fuseteam Fuseteam commented Jun 21, 2018

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

@enjeyw

This comment has been minimized.

Copy link

@enjeyw 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

This comment has been minimized.

Copy link

@dvdobrovolskiy dvdobrovolskiy commented Aug 15, 2018

same issue

hangs on
Loading dependency graph, done.

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

@yahya-pondokit

This comment has been minimized.

Copy link

@yahya-pondokit yahya-pondokit commented Aug 20, 2018

Same issue here

@Asinox

This comment has been minimized.

Copy link

@Asinox Asinox commented Aug 20, 2018

Just reinstall Watchman

@Joaquimdcp

This comment has been minimized.

Copy link

@Joaquimdcp Joaquimdcp commented Sep 2, 2018

Same issue here

@samiede

This comment has been minimized.

Copy link

@samiede 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

This comment has been minimized.

Copy link

@mrabdullahsahin mrabdullahsahin commented Sep 6, 2018

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

This comment has been minimized.

Copy link

@Fuseteam 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

This comment has been minimized.

Copy link

@MrgSub 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

This comment has been minimized.

Copy link

@geek-ibrar geek-ibrar commented Oct 8, 2018

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

it worked for me :)

@thefakhreddin

This comment has been minimized.

Copy link

@thefakhreddin thefakhreddin commented Oct 15, 2018

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

@williscool

This comment has been minimized.

Copy link

@williscool 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

This comment has been minimized.

Copy link

@pblUSA 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

This comment has been minimized.

Copy link

@Jopaul07 Jopaul07 commented Dec 18, 2018

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

This comment has been minimized.

Copy link

@vdaranyi vdaranyi commented Feb 9, 2019

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

@Saad9624

This comment has been minimized.

Copy link

@Saad9624 Saad9624 commented Feb 20, 2019

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
You can’t perform that action at this time.