0 info it worked if it ends with ok
1 verbose cli [
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 'run',
1 verbose cli 'packagr'
1 verbose cli ]
2 info using npm@6.14.7
3 info using node@v14.8.0
4 verbose run-script [ 'prepackagr', 'packagr', 'postpackagr' ]
5 info lifecycle ng-product-center@10.0.73-beta.53~prepackagr: ng-product-center@10.0.73-beta.53
6 info lifecycle ng-product-center@10.0.73-beta.53~packagr: ng-product-center@10.0.73-beta.53
7 verbose lifecycle ng-product-center@10.0.73-beta.53~packagr: unsafe-perm in lifecycle true
8 verbose lifecycle ng-product-center@10.0.73-beta.53~packagr: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\jsfund\product-pc-client\node_modules\.bin;E:\jsfund\product-pc-client\node_modules\.bin;D:\software\Oracle\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\software\jdk\bin;D:\software\apache-maven-3.6.0\bin;D:\mysql\mysql-5.7.12-winx64\bin;C:\Program Files\erl9.3\bin;C:\Python27;C:\Program Files\OpenSSH-Win64;C:\Program Files\nodejs\;D:\software\OpenVPN\bin;D:\software\Git\cmd;D:\software\python\Scripts\;D:\software\python\;D:\software\WebStorm 2020.1\bin;;C:\Users\Administrator\AppData\Roaming\npm
9 verbose lifecycle ng-product-center@10.0.73-beta.53~packagr: CWD: E:\jsfund\product-pc-client
10 silly lifecycle ng-product-center@10.0.73-beta.53~packagr: Args: [ '/d /s /c', 'ng-packagr -p ng-package.json' ]
11 silly lifecycle ng-product-center@10.0.73-beta.53~packagr: Returned: code: 111 signal: null
12 info lifecycle ng-product-center@10.0.73-beta.53~packagr: Failed to exec packagr script
13 verbose stack Error: ng-product-center@10.0.73-beta.53 packagr: `ng-packagr -p ng-package.json`
13 verbose stack Exit status 111
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
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:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1051:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid ng-product-center@10.0.73-beta.53
15 verbose cwd E:\jsfund\product-pc-client
16 verbose Windows_NT 10.0.10586
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "packagr"
18 verbose node v14.8.0
19 verbose npm v6.14.7
20 error code ELIFECYCLE
21 error errno 111
22 error ng-product-center@10.0.73-beta.53 packagr: `ng-packagr -p ng-package.json`
22 error Exit status 111
23 error Failed at the ng-product-center@10.0.73-beta.53 packagr script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 111, true ]
解决方法:一行行对比代码,按功能删除再打包,会发现是由于引用一些方法导致死循环,简略记录踩坑日记。