Missing Script when I run npm start to create React app

前端 未结 9 1301
北荒
北荒 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:35

    Check the names of the scripts in the package.json file, they may be called something different to start. e.g. this part:

    "scripts": {
      "build": "cd packages/react-scripts && node bin/react-scripts.js build",
      "start": "cd packages/react-scripts && node bin/react-scripts.js start",
    },

    Also, try printing your working directory using pwd and check to see if the current directory is correct and run npm run start again.

提交回复
热议问题