I’m running Nvm version 0.39.1, node version 16.13.1(npm v8.1.2). I’ve been running into this issue for months now where my React page wouldn’t display the new changes every time I save the file. I’ve tried every possible solution to get it to work which includes:
-adding CHOKIDAR_USEPOLLING=true
to a .env file as well as the scripts in packgage.json
-adding Fast_REFRESH=false
to a .env file as as the scripts in package.json
-Even verified that I have the max number of watches via fs.inotify.max_user_watches=524288
or something along the lines like that as I’ve searched online numerous times. My watches were already set to 524288 in the first place so I didn’t know where else to fiddle.
Now, I was able to duplicate this same issue on my laptop. I tried to set up a “clean slate” so to speak, and removed node (npm), my VScode app, as well as my nvm. Please understand that I’m not a seasoned programmer and at most times I do know what the commands actually do. With that, I should tell you my steps included:
–sudo rm -rf $NVM_DIR ~/.npm ~/.bower
–sudo rm -rf /usr/local/bin/node
And proceeded to delete vscode and all of its contents using this guide https://debug.to/1074/how-to-uninstall-vs-code-completely, and lastly, I deleted Ubuntu. Alas, after feeling like I am free from apps and libraries that were involved in my learning to code, I reinstalled everything starting Ubuntu and downloading nvm using curl: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
and installing node via nvm like so: nvm install --lts
.
Note that I’m just working on a base React App template using the npx create-react-app my-app
provided by the React docs online. npm start
would work fine, however now when I expect my files to display changes on my localhost page when I save my file it doesn’t anymore. Have I deleted something very important? Or are there conflicting leftover files?