node.js - Electron 伪造: missing some dependencies

标签 node.js npm electron

使用:Windows 10,NMP 6.4.1, Node v10.13.0,GIT 2.8.4

一个显示IMDB记录的简单应用程序:
https://ide.c9.io/learnwithcolt/webdevbootcamp文件夹APIS/movie_search_app

下载以在Windows上本地运行。运行正常。

当我运行时:

electron-forge init my-new-app

√ Checking your system
It looks like you are missing some dependencies you need to get Electron running.
Make sure you have git installed and Node.js version 6.0.0+

package.json:
    {
  "name": "imdb",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "ejs": "^2.6.1",
    "express": "^4.16.4",
    "request": "^2.88.0"
  },
  "devDependencies": {
    "electron": "^3.0.8"
  }
}

其他proyects也会发生同样的情况。 CMD以管理员身份运行。

最佳答案

The same happens with other proyects



也可以使用electron-forge或其他CLI工具吗?我的猜测是这是path问题- Electron 伪造找不到您的Node/Git安装。

您可以尝试npx electron-forge init my-new-app,但这是一个漫长的尝试。

另外,请确保您使用的是正确版本的Electron Forge。现在有一个新的东西已经坏了。

The master branch is a rewrite of Electron Forge that will eventually be the 6.x series. If you are looking for the 5.x series (the version currently published to NPM), please view the 5.x branch.



https://github.com/electron-userland/electron-forge

关于node.js - Electron 伪造: missing some dependencies,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53242891/

相关文章:

node.js - 文件大小 (6003804160) 大于可能的缓冲区 : 2147483647 in node

javascript - 用户偏好的多选项卡问题

electron - 连接到未知 IP 地址的服务器

javascript - 为什么我需要让我的 Electron 窗口比我的 Canvas 大?

node.js - 无法从注册表加载包信息 : The "timeout" argument must be of type number. 收到类型字符串 ('100000' )

Electron Linux 视频硬件加速

javascript - 从 PHP 过渡到 JavaScript(AngularJS、NodeJS 等...)的最佳方式

javascript - 将 youtube api 与 node.js 客户端结合使用

node.js - 容器不尊重进程的退出状态

npm - 如何从asp.net vnext项目中的wwwroot访问node_modules文件夹