Reputation: 27
everyone! I run into some silly problem; every time I run npm start
I face the following error:
events.js:288
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
One way of tackling this issue is to change the following line "react-scripts": "3.4.1"
in package.json to "react-scripts": "2.1.8"
Why does that happen? It's really such a pain in the neck... any help is appreciated!!!
Upvotes: 2
Views: 68
Reputation: 32532
That is my motto:
For ridiculous issues, seek to find ridiculous solutions
Actually, it happens just because of your environment settings, you should set your Windows environment variable, _add %SystemRoot%\system32
to your PATH, if it right, tell me to post it as an answer:
On the Windows desktop, right-click My Computer.
In the pop-up menu, click Properties.
In the System Properties window, click the Advanced tab, and then click Environment Variables.
In the System Variables window, highlight Path, and click Edit.
In the Edit System Variables window, insert the cursor at the end of the Variable value field.
If the last character is not a semi-colon (;), add one.
After the final semi-colon, type the full path to the file you want to find.
%SystemRoot%\system32
Click OK in each open window
Restart System
Upvotes: 2