简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM