npm start遇到问题:code ELIFECYCLE errno 1
启动时候报错,百度了一下,说是端口问题,改了webpack.config.js中的port端口,改了几个试了试,还是不行。
日志如下:
0 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@v10.15.3 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle es6-webpack@1.0.0~prestart: es6-webpack@1.0.0 6 info lifecycle es6-webpack@1.0.0~start: es6-webpack@1.0.0 7 verbose lifecycle es6-webpack@1.0.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle es6-webpack@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\es6-webpack\node_modules\.bin;C:\Users\Administrator\es6-webpack\node_modules\.bin;C:\Program Files (x86)\NetSarang\Xshell 6\;C:\Program Files\Java\jdk1.8.0\bin;C:\Program Files\Java\jdk1.8.0\jre\bin;C:\Program Files (x86)\Common Files\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:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\apache-maven-3.6.0\bin; C:\apache-tomcat-9.0.17\lib;C:\apache-tomcat-9.0.17\bin;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\ 9 verbose lifecycle es6-webpack@1.0.0~start: CWD: C:\Users\Administrator\es6-webpack 10 silly lifecycle es6-webpack@1.0.0~start: Args: [ '/d /s /c', 'webpack-dev-server --open' ] 11 silly lifecycle es6-webpack@1.0.0~start: Returned: code: 1 signal: null 12 info lifecycle es6-webpack@1.0.0~start: Failed to exec start script 13 verbose stack Error: es6-webpack@1.0.0 start: `webpack-dev-server --open` 13 verbose stack Exit status 1 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 EventEmitter.emit (events.js:189:13) 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 ChildProcess.emit (events.js:189:13) 13 verbose stack at maybeClose (internal/child_process.js:970:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid es6-webpack@1.0.0 15 verbose cwd C:\Users\Administrator\es6-webpack 16 verbose Windows_NT 6.1.7601 17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" 18 verbose node v10.15.3 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 1 22 error es6-webpack@1.0.0 start: `webpack-dev-server --open` 22 error Exit status 1 23 error Failed at the es6-webpack@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 [ 1, true ]