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..
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
It's not related to react-native, metro bundler, or sudo permission, It's because of .git/index.lock file!
Just remove it and everything would be OK.
Execute this command in the root directory of your project:
rm .git/index.lock
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With