react-nativemetro-bundlerwatchman

React-native Fast Refresh broken


recently my Fast Refresh stopped working across ALL of my react native projects, I have even tried init-ing a new project and it is not working there too

I have tried all the attempts below:

-. watchman watch-del-all
-. rm -rf /usr/local/var/run/watchman && brew uninstall watchman && brew install watchman
-. clean node_modules and "npm run -- --reset-cache"

Whatever way I try to reload the app after modifying the source code, the change will not get reflected. I have to stop and uninstall the app, run npm run -- --reset-cache and then run npm run android again in order to have the changes reflected.

This is really killing me as I can not find the cause of it. It was working before and I did not install any app on my machine. I am now short of formatting my machine and start everything from scratch again but this is a Mac and it is troublesome to reformat..


Solution

  • Have you tried ALL the solutions mentioned here? Seems like there're still a bunch that you haven't tried

    https://github.com/facebook/react-native/issues/28420

    I tried almost all and still not working, in desperation, the

    sudo npx react-native start solved my problem

    https://github.com/facebook/react-native/issues/28420#issuecomment-755082770