npm start error with create-react-app

后端 未结 20 1898
长发绾君心
长发绾君心 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:10

    Yes you should not install react-scripts globally, it will not work.

    I think i didn't use the --save when i first created the project (on another machine), so for me this fixed the problem :

    npm install --save react react-dom react-scripts
    

提交回复
热议问题