【问题标题】:what is the requirements for npm start to run?npm start 运行的要求是什么?
【发布时间】:2020-02-24 06:37:03
【问题描述】:

我无法在我的项目中运行npm start,这是我的package.json 文件:

{
  "name": "babek",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.3",
    "babel-preset-env": "^1.7.0",
    "react": "^16.11.0",
    "react-dom": "^16.11.0",
    "react-scripts": "^3.1.1",
    "webpack": "^4.41.2"
  }
}

终端说:Failed at the babek@1.0.0 start script.

该项目仍然包含一些非常基本的文件。那么这里有什么问题,npm start 启动服务器有什么要求??

【问题讨论】:

    标签: javascript npm webpack package.json


    【解决方案1】:

    您需要将其包含在脚本下:

         "scripts": {
             "start": "react-scripts start"
          }
    

    【讨论】:

      猜你喜欢
      • 2015-11-17
      • 2019-07-22
      • 2017-04-08
      • 1970-01-01
      • 2021-01-25
      • 2015-09-08
      • 1970-01-01
      • 1970-01-01
      • 2020-08-21
      相关资源
      最近更新 更多