使用: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/