当我半年没有碰electron的时候出现了这个
'electron' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! electron@1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\10507\AppData\Roaming\npm-cache\_logs\2021-05-06T11_44_57_076Z-debug.log
解决方法
win10:
window键 + X 键
调出windows PowerShell 管理员
输入
set-ExecutionPolicy RemoteSigned
选择输入 Y
回过去打开项目 开跑就ok了