0

Although npm start or react-native start is running app gives this error:

enter image description here

When I searched I tried npm install it gives this error:

enter image description here

How to fix this?

It seems like missing a dependency of the react native project.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Dinuka Salwathura
  • 924
  • 16
  • 33

2 Answers2

1

The prompt show very clear,Unable to connect your device to the packager sever.

If your device and your computer under the same wi-fi,You can according to the last attempt to modify the connection attributes of your device.

舒文颉
  • 91
  • 1
  • i understand your suggestion, i set the correct ip address for the debug server host & port also. But it was an error of react version. There was unmet dependencies. How I solved is by executing "npm install --force react@15.3.1" – Dinuka Salwathura Dec 03 '16 at 10:50
  • This problem can try under reference [link](http://stackoverflow.com/questions/20764881/why-does-npm-install-say-i-have-unmet-dependencies) – 舒文颉 Dec 03 '16 at 16:27
0

install the dependency packages

npm install --force react@15.3.1

instead of

npm install react@15.3.1
Dinuka Salwathura
  • 924
  • 16
  • 33