3
votes

react-native start command stuck on Loading dependency graph, done. Running Metro Bundler on port 8081.

Windows 8 : node version : 8.11.3 npm version : 6.3.0 react-native: 0.56.0

package.json

{ "name": "TestApp", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "react": "16.4.1", "react-native": "0.56.0" }, "devDependencies": { "babel-jest": "23.4.2", "babel-preset-react-native": "5.0.2", "jest": "23.5.0", "react-test-renderer": "16.4.1" }, "jest": { "preset": "react-native" } }

3

3 Answers

2
votes

It's supposed to get stuck there until a device successfully connects to it. The problem is probably that your device for some reason is unable to find your computer, in that case you should get an error message on the phone mentioning it can't connect to the development server. All those suggestions mentioned in that error message may help you solve the problem. Pay extra attention to the development server's host and port configuration. If you have configured the host and port a long time ago and it suddenly stopped to work, a likely cause could be that your computer has been assigned a new ip address, so maybe double check that you're using the correct IP address. Another problem may be that your computer isn't publicly visible on your network.

1
votes

Try this.

Your device can't found localhost like Lenny Laughter said, and the solution to that is running adb -s <device name> reverse tcp:8081 tcp:8081.

This way, your device can see the port 8081 and connect to the Metro Bundler.

-1
votes

You need to start the app on your physical device or emulator.