I am following a tutorial on React using create-react-app. The application is created by create-react-app v1.3.0
create-react-app my-app
T
I came up against this same problem when starting the server through npm run start
. When I changed it to npm start
, it worked as expected.
Install Addon Classic Cache Killer on Chrome, 100% will solve the problem.
For Linux system you can try
sudo npm start
After creating a new project using create-react-app toolchain
Make sure to run
npm install
, thennpm start
Find your index.js
and change something in this file, for example add a white space, then save.
It should show "compiling..." in your console.
Then you can modify other files and react will refresh on save.
It seems that npm is looking for changes in the index.js at the very first time, if you refactor your folder structure the index.js could be missed. Force an update in index.js file get the problem solved.
At least this has worked to me
Try using this command
echo fs.inotify.max_user_watches=524288
sudo tee -a /etc/sysctl.conf && sudo sysctl -p
If still, the error is there then you need to remove your node modules and again
npm install
and then
npm start