npm start issues with react-scripts 3.4.0

后端 未结 5 887
悲哀的现实
悲哀的现实 2021-01-27 06:27

I know this question has already been asked but I can\'t find a solution. When I run npm start inside a react project, I always get the same logs (see below). The o

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-27 06:34

    Changing the path worked for me. Just to add, on the above solution for those who didn't know how to change the path (same as me) and some more details.

    Here is my way on how to change environment variables on Windows 10:

    • Open the Start Search, type in “env”, and choose “Edit the system environment variables”
    • Click the Environment Variables… button.
    • Go on system variables and under variables find PATH, mark it and click EDIT.
    • On the end of the list add paths - you can simply click on new or on the empty field on the end of list: C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem
    • Remember to have the npm paths as well: C:\Program Files\nodejs C:\Users{yourName}\AppData\Roaming\npm
    • Set the environment variables as needed.
    • The New button adds an additional variable. ...
    • Dismiss all of the dialogs by choosing OK. Your changes are saved!
    • Restart the computer.

    Now it should work!

提交回复
热议问题