我正在尝试在Windows 10机器上运行电子应用程序。
我已经克隆了electron-quick-start示例,但是当我运行npm install
时,得到以下输出:
> electron@2.0.0 postinstall C:\Users\aiden\Documents\BVN\GitHub\electron-quick-start\node_modules\electron
> node install.js
/bin/bash: node: command not found
npm ERR! file bash
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! electron@2.0.0 postinstall: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the electron@2.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aiden\AppData\Roaming\npm-cache\_logs\2018-07-16T05_51_27_649Z-debug.log
运行以下命令时,我得到:
npm -v
:
6.1.0
where npm
:
C:\Users\aiden\AppData\Roaming\npm\npm
C:\Users\aiden\AppData\Roaming\npm\npm.cmd
node -v
:v10.6.0
where node
:
C:\Program Files\nodejs\node.exe
节点运行正常(例如node hello.js
)
我可以在某些程序包上运行npm install <package>
且没有错误,例如npm install node-gyp
,而不是其他人:npm install serialport
或npm install electron
我怀疑它与Electron无关,但出于完整性考虑(在与切线关系的情况下),我已经提到了它。