缺少脚本开始 [英] Missing Script Start
本文介绍了缺少脚本开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试运行这个示例.开始运行时出现以下错误:
I'm trying to run this example. I have these errors when I start running it:
npm 错误!缺少脚本:开始
npm ERR! missing script: start
npm 错误!可以在以下位置找到此运行的完整日志:
npm ERR! A complete log of this run can be found in:
npm ERR!/home/username/.npm/_logs/2018-04-15T09_19_49_453Z-debug.log
npm ERR!/home/username/.npm/_logs/2018-04-15T09_19_49_453Z-debug.log
有什么帮助吗?
推荐答案
您应该将 start
脚本添加到 package.json
中:
You should add start
script to the package.json
:
"scripts": {
"start": "node index.js"
}
此外,您只需运行以下命令即可在没有脚本的情况下运行您的应用:
Also, you can run your app without a script just by running the following command:
$ node index.js
这篇关于缺少脚本开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文