我无法在我的项目中运行 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"
}
}
终端显示:babek@1.0.0 启动脚本失败。
该项目仍然包含一些非常基本的文件。那么这里可能出了什么问题,npm start
启动服务器的要求是什么??
最佳答案
您需要将其包含在脚本下:
"scripts": {
"start": "react-scripts start"
}
关于javascript - npm start 运行有什么要求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58600356/