//这些是错误日志详细信息
0如果它以ok结束它是否有效
1详细cli [' C:\ Program Files \ nodejs \ node.exe',
1详细cli' C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ bin \ npm-cli.js',
1 verbose cli' start' ]
2信息使用npm@5.4.2
3 info使用node@v6.11.3
4详细堆栈错误:缺少脚本:启动
4运行时的详细堆栈(C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ lib \ run-script.js:151:19)
4个详细堆栈位于C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ lib \ run-script.js:61:5
4个详细堆栈位于C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ read-package-json \ read-json.js:115:5
4个详细堆栈位于C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ read-package-json \ read-json.js:402:5
checkBinReferences_上的4个详细堆栈(C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ read-package-json \ read-json.js:357:45)
最后4个详细堆栈(C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ read-package-json \ read-json.js:400:3)
然后是4个详细堆栈(C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ read-package-json \ read-json.js:160:5)
ReadFileContext上的4个详细堆栈。 (C:\用户\ SamiUllahJan \应用程序数据\漫游\ NPM \ node_modules \ NPM \ node_modules \读取包JSON \读取json.js:332:20)
ReadFileContext.callback上的4个详细堆栈(C:\ Users \ SamiUllahJan \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ graceful-fs \ graceful-fs.js:78:16)
FSReqWrap.readFileAfterOpen上的4个详细堆栈[as oncomplete](fs.js:367:13)
5详细cwd C:\ Samy \ Code School
6详细的Windows_NT 6.3.9600
7详细的argv" C:\ Program Files \ nodejs \ node.exe" " C:\用户\ SamiUllahJan \应用程序数据\漫游\ NPM \ node_modules \ NPM \ BIN \ NPM-cli.js" "开始"
8详细节点v6.11.3
9详细npm v5.4.2
缺少10个错误脚本:启动
11详细退出[1,true]
答案 0 :(得分:0)
键入终端
npm start
npm在package.json文件中查找您未定义的启动脚本。
将package.json文件更改为这样(注意脚本属性):
{
"name": "sample-app",
"version": "1.0.0",
"description": "",
"scripts": {
"start": "node index.js"
}
}