Missing Script when I run npm start to create React app

前端 未结 9 1338
北荒
北荒 2021-01-01 18:20

I\'m trying to run the React server by running npm start

When I do this I get a missing script error:

λ npm start
npm ERR! missing scrip         


        
9条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 18:33

    This problem has created and still is creating a lot of headaches:

    https://github.com/facebook/create-react-app/issues/8308
    https://github.com/facebook/create-react-app/issues/8086

    Basically the suggestion is correct, may be you have an old version of something around, first try to remove the global create-react-app

    npm uninstall -g create-react-app
    

    Then try to update the npm and all the packages.

    npm install -g npm@latest
    

    Then you can run to create react app again.

    npx create-react-app my-app
    

    This has solved the issue in my case

提交回复
热议问题