在构建电子应用时,有几次我得到的错误就像这个
PS C:\users\roryo\desktop\labs\eqs> npm start
> eqs@1.0.0 start C:\users\roryo\desktop\labs\eqs
> electron .
uilt\cli.js" . was unexpected at this time.
C:\users\roryo\desktop\labs\eqs>)uilt\cli.js" .
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! eqs@1.0.0 start: `electron .`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the eqs@1.0.0 start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the eqs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs eqs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls eqs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\roryo\AppData\Roaming\npm-cache\_logs\2017-05-29T22_37_33_920Z-debug.log
我已将此问题追溯到electron.cmd
中的一个问题@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\electron\cli.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\electron\cli.js" %*
)uilt\cli.js" %*
)
如果我删除了倒数第二行)uilt\cli.js" %*
,我就不会再收到错误消息了。由于我有一个简单的解决方法,这确实是一个学术问题。
这个问题来自哪里?我反复搜索它没有成功。