question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Code change never showing up on reload (Hot reload not working either)

See original GitHub issue

Description

So I am following the sample app. This used to work on my old machine, but I moved to a new one and suddenly it’s not working.

Seems like watchman is not detecting file changes anymore?

AwesomeProject ➜ npm run start

> AwesomeProject@0.0.1 start /Users/jordan/Desktop/AwesomeProject
> node node_modules/react-native/local-cli/cli.js start

(node:372) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
(node:372) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.
Scanning 709 folders for symlinks in /Users/jordan/Desktop/AwesomeProject/node_modules (4ms)
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚  Running packager on port 8081.                                            β”‚
 β”‚                                                                            β”‚
 β”‚  Keep this packager running while developing on any JS projects. Feel      β”‚
 β”‚  free to close this tab and run your own packager instance if you          β”‚
 β”‚  prefer.                                                                   β”‚
 β”‚                                                                            β”‚
 β”‚  https://github.com/facebook/react-native                                  β”‚
 β”‚                                                                            β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Looking for JS files in
   /Users/jordan/Desktop/AwesomeProject

[Hot Module Replacement] Server listening on /hot

React packager ready.

[11/11/2016, 9:15:16 PM] <START> Initializing Packager
[11/11/2016, 9:15:16 PM] <START> Building in-memory fs for JavaScript
[11/11/2016, 9:15:16 PM] <END>   Building in-memory fs for JavaScript (193ms)
[11/11/2016, 9:15:16 PM] <START> Building Haste Map
[11/11/2016, 9:15:17 PM] <END>   Building Haste Map (600ms)
[11/11/2016, 9:15:17 PM] <END>   Initializing Packager (869ms)

I see the above when I run npm run start. If I make a change to index.ios.js and save it, nothing happens. And if I hit CMD-r the simulator reloads but my change does not appear unless I stop npm run start and run it again.

Reproduction

I just did this:

react-native init AwesomeProject
cd AwesomeProject
react-native run-ios

And then ran npm run start or even if I do react-native run-ios, same issue.

Additional Information

react-native-cli: 1.2.0 react-native: 0.37.0 node: v7.0.0 watchman: 4.7.0

  • Platform: ios and android
  • Operating System: MacOS Sierra.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

72reactions
Jonovonocommented, Nov 16, 2016

Hey everyone. @leeight @RomualdPercereau @chanceeakin @bluefantasy728 Did some playing around and wasn’t getting answers anywhere.

I did the following and it seems to be working now:

rm -rf /usr/local/var/run/watchman && brew uninstall watchman && brew install watchman

Hopefully that works for you!

14reactions
chanceeakincommented, Nov 16, 2016

@Jonovono: It worked!!!

You’re the hero we need, not the one we deserve.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Hot Reload on Visual Studio 2022 - Stack Overflow
I was blaming VS for un-functional Hot Reload, but in my case it was caused by trying to Debug ( F5 ) and...
Read more >
Hot reload not working - Visual Studio Feedback
I'm trying to use Hot Reload on Android Emulador, but when I do any change in XAML file, the app doesn't update. Looking...
Read more >
Visual Studio Hot Reload for code changes not working
I am having an issue with Hot Reload not working with C# code changes with Android project, even though it is enabled for...
Read more >
Anyone else having huge problems with VS 2022 and Hot ...
Hot reload is much better in Flutter, and you can edit the code without needing to be on breakpoint like in VS.
Read more >
Hot reload - Flutter documentation
If code changes affect the state of your app (or its dependencies), the data your app has to work with might not be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found