【发布时间】:2017-05-21 12:48:31
【问题描述】:
我尝试使用 Electron 创建我的第一个 Angular 应用程序,因此我在此处遵循本指南:
所以我一步一步地做指南中的内容,但是当我执行此命令时:
npm start
我在这里收到此错误:
$ npm start
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! missing script: start
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! D:\FreeLancer\angular2electron\npm-debug.log
package.json
{
"name": "angular2electron",
"version": "1.0.1",
"description": "my first angularjs",
"main": "main.js",
"dependencies": {
"electron": "^1.4.13"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "LAIDANI Youcef",
"license": "MIT"
}
有人知道这个问题吗?
谢谢。
【问题讨论】:
-
你的
package.json是什么样的? -
@corn3lius 我编辑我的问题,你可以查看我的
package.json -
npm test将运行scipts.test中的命令。npm start将运行您在scripts.start中输入的命令 -
电子快速启动github.com/electron/electron-quick-start/blob/master/…的启动脚本为
electron . -
哦,效果很好,非常感谢@corn3lius :)