2

I can't be sure it happened because of that but I updated my project name using react-native-rename and rebuild the project couple of hours later. Since then I cant reload my project on device.

Note On simulator it works , not working only on real device. Running npm-start return :

┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│  Running Metro Bundler on port 8081.                                         │
│                                                                              │
│  Keep Metro running while developing on any JS projects. Feel free to        │
│  close this tab and run your own Metro instance if you prefer.               │
│                                                                              │
│  https://github.com/facebook/react-native                                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Looking for JS files in
   /Users/Project/Client 


Metro Bundler ready.

Loading dependency graph, done. 

and never updating no matter what. I tried to look for .lock inside .git as suggested here #4357 but I can't find the .git directory so I believe it isnt the issue.

I also tried rm -rf /usr/local/var/run/watchman && brew uninstall watchman && brew install watchman as suggested here #10889 without any luck.

Along the route I tried as well watchman watch-del-all and rm -fr /usr/local/var/run/watchman/$USER-state

1 Answer 1

5

You should set a debug server address for a real device.

  1. Make sure your laptop and your phone are on the same Wi-Fi network.
  2. Open your React Native app on your device.
  3. You'll see a red screen with an error. This is OK. The following steps will fix that.
  4. Open the in-app Developer menu.
  5. Go to Dev Settings → Debug server host for device.
  6. Type in your machine's IP address and the port of the local dev server (e.g. 10.0.1.1:8081).
  7. Go back to the Developer menu and select Reload JS.

https://facebook.github.io/react-native/docs/running-on-device.html#method-2-connect-via-wi-fi

1
  • yes apparently my phone disconnected from the wifi and I didn't notice that. Jul 3, 2018 at 16:11

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.