I have a problem with my application. Because before when I created an application it worked, but now, it shows me this error and I do not know why and the things I have to
If someone hits this coming from Angular 2+, remove the --open from ng serve or run without this option.
Solution 1
Set your environment variable to C:\Windows\System32 . This works for me.
Sets System variable
Solution 2
If the first one doesn't work follow the 2nd steps. Navigate to your project folder and type this command >>>
rm -rf node_modules
rm package-lock.json
rm yarn.lock
npm cache clear --force
npm install
Solution 3
Downgrade react-scripts in package.json file
I had the same problem after I tried to install Mongo DB. I found out that this problem only exists with react-scripts@3.0.0. Try to reinstall your npm with a different react script version. Simply go to your folder in command and reinstall like this:
npm install react-scripts@2.1.8
npm start
After that the app worked for me again.
For all those Who've come to this problem from react scripts not starting. The solution is
C:\Windows\System32
.Add C:\Windows\System32 to the global PATH environment variable.