使用“ npm start”时收到错误消息,此错误提示我。
我已经尝试过npm-cache-clean,并且还尝试删除node_modules以及删除package-lock.json,然后尝试“ npm install”,但这并没有产生不同的结果。
npm ERR! code ELIFECYCLE
npm ERR! errno 77
npm ERR! crimstock@1.0.0 start: `electron .`
npm ERR! Exit status 77
npm ERR!
npm ERR! Failed at the crimstock@1.0.0 start 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\Negus\AppData\Roaming\npm-cache\_logs\2019-04-23T04_45_49_315Z-debug.log
info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@6.4.1
3 info using node@v8.12.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle crimstock@1.0.0~prestart: crimstock@1.0.0
6 info lifecycle crimstock@1.0.0~start: crimstock@1.0.0
7 verbose lifecycle crimstock@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle crimstock@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Desktop\Crimstock2\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Negus\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\Negus\Desktop\Code\phantomjs-2.1.1-windows\phantomjs-2.1.1-windows\bin;C:\Program Files\Git\cmd;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\nodejs;C:\Users\Negus\AppData\Local\Programs\Python\Python36-32\Scripts;C:\Users\Negus\AppData\Local\Programs\Python\Python36-32;C:\Phantom\phantomjs-2.1.1-windows\bin;C:\Users\Negus\AppData\Roaming\npm;C:\Users\Negus\AppData\Local\Microsoft\WindowsApps;C:\Mongodb\bin;C:\Program Files\heroku\bin
9 verbose lifecycle crimstock@1.0.0~start: CWD: D:\Desktop\Crimstock2
10 silly lifecycle crimstock@1.0.0~start: Args: [ '/d /s /c', 'electron .' ]
11 silly lifecycle crimstock@1.0.0~start: Returned: code: 77 signal: null
12 info lifecycle crimstock@1.0.0~start: Failed to exec start script
13 verbose stack Error: crimstock@1.0.0 start: `electron .`
13 verbose stack Exit status 77
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid crimstock@1.0.0
15 verbose cwd D:\Desktop\Crimstock2
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 77
22 error crimstock@1.0.0 start: `electron .`
22 error Exit status 77
23 error Failed at the crimstock@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 77, true ]
我希望电子应用程序启动并且不抛出错误,因为我无法测试我拥有的index.js文件中的任何JavaScript