npm start error with create-react-app

后端 未结 20 1859
长发绾君心
长发绾君心 2020-11-27 10:18

I have a project who I didn\'t touch for 2 weeks. I take it back and now when I try to run npm start I got this error.

> react-scripts start
         


        
相关标签:
20条回答
  • 2020-11-27 11:16

    add environment variables in windows

    1. C:\WINDOWS\System32
    2. C:\Program Files\nodejs
    3. C:\Program Files\nodejs\node_modules\npm\bin
    4. C:\WINDOWS\System32\WindowsPowerShell\v1.0
    5. C:\Users{your system name without curly braces}\AppData\Roaming\npm

    these 5 are must in path.

    and use the latest version of node.js

    0 讨论(0)
  • 2020-11-27 11:16

    I have created react project locally. This reason of occurring this problem (for me) was that I didn't use sudo before npm and it needs root access (

    > sudo npm start
    

    PS1: For windows users, the powershell or command line should be run as administrator)

    PS2: If use want to solve the root access issue, you can see this post.

    0 讨论(0)
提交回复
热议问题