Mukhammad Sobirov
Mukhammad Sobirov

Reputation: 27

Problems while starting CRA with npm start

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

Answers (1)

AmerllicA
AmerllicA

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:

  1. On the Windows desktop, right-click My Computer.

  2. In the pop-up menu, click Properties.

  3. In the System Properties window, click the Advanced tab, and then click Environment Variables.

  4. In the System Variables window, highlight Path, and click Edit.

  5. In the Edit System Variables window, insert the cursor at the end of the Variable value field.

  6. If the last character is not a semi-colon (;), add one.

  7. After the final semi-colon, type the full path to the file you want to find.

    %SystemRoot%\system32
    
  8. Click OK in each open window

  9. Restart System

Upvotes: 2

Related Questions