npm run start 是正常的 1.尝试过 delete package-lock.json & node_modules and then rerun npm install and npm run build. 2.猜测是 CSS 编译错误
npm ERR! errno 1 npm ERR! socialsport@1.0.0 build: `node build/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the socialsport@1.0.0 build 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\cai_e\AppData\Roaming\npm-cache\_logs\2020-05-31T15_56_35_023Z-debug.log
详细 log 0 info it worked if it ends with ok 1 verbose cli [ 'D:\\nodeJs\\node.exe', 1 verbose cli 'D:\\nodeJs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'build' ] 2 info using npm@6.4.1 3 info using node@v10.15.3 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle socialsport@1.0.0~prebuild: socialsport@1.0.0 6 info lifecycle socialsport@1.0.0~build: socialsport@1.0.0 7 verbose lifecycle socialsport@1.0.0~build: unsafe-perm in lifecycle true 8 verbose lifecycle socialsport@1.0.0~build: PATH: D:\nvm\v10.15.3\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\social\web\node_modules\.bin;D:\Xshell 6\;D:\Python3\Scripts\;D:\Python3\;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\cai_e\AppData\Local\Microsoft\WindowsApps;E:\work\erl8.1\bin;D:\TortoiseSVN\bin;E:\work\Git\cmd;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\TortoiseGit\bin;D:\nvm;D:\nodeJs;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\cai_e\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\cai_e\AppData\Local\Programs\Python\Python37\;C:\Users\cai_e\AppData\Local\Microsoft\WindowsApps;D:\Microsoft VS Code\bin;C:\Users\cai_e\AppData\Local\GitHubDesktop\bin;D:\nvm;D:\nodeJs;C:\Program Files\MySQL\MySQL Server 8.0\bin; 9 verbose lifecycle socialsport@1.0.0~build: CWD: D:\social\web 10 silly lifecycle socialsport@1.0.0~build: Args: [ '/d /s /c', 'node build/build.js' ] 11 silly lifecycle socialsport@1.0.0~build: Returned: code: 1 signal: null 12 info lifecycle socialsport@1.0.0~build: Failed to exec build script 13 verbose stack Error: socialsport@1.0.0 build: `node build/build.js` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (D:\nvm\v10.15.3\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> (D:\nvm\v10.15.3\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 socialsport@1.0.0 15 verbose cwd D:\social\web 16 verbose Windows_NT 10.0.18362 17 verbose argv "D:\\nodeJs\\node.exe" "D:\\nodeJs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" 18 verbose node v10.15.3 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 1 22 error socialsport@1.0.0 build: `node build/build.js` 22 error Exit status 1 23 error Failed at the socialsport@1.0.0 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]