2

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!!!

4
  • 1. What's your nodejs version? 2. Do you have create-react-app installed globally? 3. Try to rm -rf node_modules && npm install && npm start Commented Jun 30, 2020 at 20:17
  • I don't know why this happens in some Windows systems. I leave an upvote to your question. thanks. Commented Jun 30, 2020 at 20:20
  • Hey, @EliyaCohen. My Nodejs version is v12.16.1. Yes I have CRA installed globally. Some people are saying that it could cause an error. But my peers don't seem to run into the same issue... Commented Jul 1, 2020 at 5:40
  • 1
    Remove it from your global and use npx create-react-app instead Commented Jul 1, 2020 at 6:05

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

Finally, Worked! I after the following the process described above, I just restarted my laptop and it worked. Thanks, @AmerllicA

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.