I know this question has already been asked but I can\'t find a solution. When I run npm start
inside a react project, I always get the same logs (see below). The o
I finally found a solution. Add the default variables in the machines PATH:
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
Screenshot of variables location
Changing the path worked for me. Just to add, on the above solution for those who didn't know how to change the path (same as me) and some more details.
Here is my way on how to change environment variables on Windows 10:
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Program Files\nodejs
C:\Users{yourName}\AppData\Roaming\npm
Now it should work!
It took me two days to resolve this issue.
Its because of the incompatibility issue of react-scripts so try installing different versions like:
This worked for me:
npm install --save react-scripts@2.1.8
This one did work for many as they claim:
npm install --save react-scripts@3.3.0
It should work as it did to me after an arduous struggle.
Open the Start Search, type in “env”, and choose “Edit the system environment variables
Click the Environment Variables Button.
Go on system variables and under variables find PATH, mark it and click EDIT.
On the end of the list add paths - you can simply click on new or on the empty field
Go to your react app folder then go to node_modules
and then go to bin
folder and then copy url
Paste your url in new path
Sometimes on windows, I get the same error message randomly if the npm cache is somehow messed up.
Try to run
npm cache clean --force
Delete the node_modules folder and the package.lock.json file and run npm install
afterward.