缺少脚本:启动Electron

时间:2017-01-06 17:32:57

标签: angularjs npm electron

我尝试使用Electron创建我的第一个角应用程序,所以我在这里遵循本指南:

Electron Documentation

所以我一步一步地做指南中的内容,但当我执行此命令时:

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"
}

有人对这个问题有所了解吗?

谢谢。

1 个答案:

答案 0 :(得分:5)

Chars运行package.json中的脚本。要使用它运行电子应用程序,只需将scala> List("abc", "def", "ghi").combinations(2).map(_.mkString("-")).toList res2: List[String] = List(abc-def, abc-ghi, def-ghi) scala> "abc".combinations(2).map(_.mkString("-")).toList res3: List[String] = List(a-b, a-c, b-c) 添加到启动脚本:

<强>的package.json

npm start