【问题标题】:Error running Electron运行 Electron 时出错
【发布时间】:2016-09-17 20:16:35
【问题描述】:

我成功运行了电子 GUI 来测试我的应用程序,包括他们在这里拥有的电子 hello world 应用程序:http://electron.atom.io/docs/tutorial/quick-start/

但是,现在每当我在命令行中键入命令:npm start 时,我都会收到此错误(即使只是尝试再次设置 hello world 示例):

12 error Windows_NT 6.1.7601
13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
14 error node v4.4.4
15 error npm  v2.15.1
16 error code ELIFECYCLE
17 error electron-quick-start@1.0.0 start: `electron main.js`
17 error Exit status 3221225781
18 error Failed at the electron-quick-start@1.0.0 start script 'electron main.js'.
18 error This is most likely a problem with the electron-quick-start package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     electron main.js
18 error You can get information on how to open an issue for this project with:
18 error     npm bugs electron-quick-start
18 error Or if that isn't available, you can get their info via:
18 error
18 error     npm owner ls electron-quick-start
18 error There is likely additional logging output above.

当我致电npm start 时,我之前设置的一个电子应用程序实例仍然可以工作。

我希望能够设置新应用,部分原因是我原来的应用没有正确的文件夹结构。


所以我使用npm list --depth 1 访问了两个文件夹,其中包含工作的电子应用程序和不工作的电子应用程序。两者都显示electron-prebuilt@1.1.0 存在。虽然使用 npm list -g 表明 electron-prebuilt 没有全局安装,但也许这是个好主意?

【问题讨论】:

    标签: node.js npm electron


    【解决方案1】:

    将 Electron 更新为 v1.1.1 (npm install electron-prebuilt@latest --save-dev),这有望解决您的问题(这可能是您缺少 VC++2015 运行时)。全局安装 electron-prebuilt 不会解决任何问题。

    【讨论】:

    • 在到处寻找这就是我的情况的解决方案之后。
    猜你喜欢
    • 2021-10-02
    • 1970-01-01
    • 1970-01-01
    • 2017-02-02
    • 2018-11-14
    • 1970-01-01
    • 1970-01-01
    • 2021-02-01
    • 2012-10-17
    相关资源
    最近更新 更多