当我“ npm启动”在Hyperledger composer中使用yeoman创建的Angular应用时,出现92%的资产优化错误

时间:2019-03-17 20:07:36

标签: angular yeoman hyperledger-composer yeoman-generator-angular

我正在使用ubuntu ec2实例开发Hyperledger作曲器。我使用yeoman为我的hyperledger作曲者项目创建了一个框架式的角度应用程序。我在端口3000上启动了composer rest API,然后使用yo命令创建了角度应用。 但是,当我尝试运行命令npm start时,处理陷入了92% chunk asset optimization

> angular-dine-chain@0.0.1 start /home/ubuntu/fabric-dev-servers/angular-dine-chain
> ng serve --proxy-config proxy.conf.js --host 0.0.0.0

** NG Live Development Server is running on http://0.0.0.0:4200 **
 10% building modules 4/4 modules 0 active[HPM] Proxy created: [ '/auth', '/api' ]  ->  http://localhost:3000
[HPM] Proxy created: /  ->  http://localhost:3000                                                                         92% chunk asset optimization

否则会导致以下错误:

> angular-dine-chain@0.0.1 start /home/ubuntu/fabric-dev-servers/angular-dine-chain
> ng serve --proxy-config proxy.conf.js --host 0.0.0.0

** NG Live Development Server is running on http://0.0.0.0:4200 **
 10% building modules 4/4 modules 0 active[HPM] Proxy created: [ '/auth', '/api' ]  ->  http://localhost:3000
[HPM] Proxy created: /  ->  http://localhost:3000                                                                              92% chunk asset optimizationKilled       
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! angular-dine-chain@0.0.1 start: `ng serve --proxy-config proxy.conf.js --host 0.0.0.0`
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the angular-dine-chain@0.0.1 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!     /home/ubuntu/.npm/_logs/2019-03-17T19_22_49_675Z-debug.log

这是运行的完整日志:

0 info it worked if it ends with ok
1 verbose cli [ '/home/ubuntu/.nvm/versions/node/v8.15.1/bin/node',
1 verbose cli   '/home/ubuntu/.nvm/versions/node/v8.15.1/bin/npm',
1 verbose cli   'start' ]
2 info using npm@6.4.1
3 info using node@v8.15.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular-dine-chain@0.0.1~prestart: angular-dine-chain@0.0.1
6 info lifecycle angular-dine-chain@0.0.1~start: angular-dine-chain@0.0.1
7 verbose lifecycle angular-dine-chain@0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle angular-dine-chain@0.0.1~start: PATH: /home/ubuntu/.nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/fabric-dev-servers/angular-dine-chain/node_modules/.bin:/home/ubuntu/.nvm/versions/node/v8.15.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle angular-dine-chain@0.0.1~start: CWD: /home/ubuntu/fabric-dev-servers/angular-dine-chain
10 silly lifecycle angular-dine-chain@0.0.1~start: Args: [ '-c', 'ng serve --proxy-config proxy.conf.js --host 0.0.0.0' ]
11 silly lifecycle angular-dine-chain@0.0.1~start: Returned: code: 137  signal: null
12 info lifecycle angular-dine-chain@0.0.1~start: Failed to exec start script
13 verbose stack Error: angular-dine-chain@0.0.1 start: `ng serve --proxy-config proxy.conf.js --host 0.0.0.0`
13 verbose stack Exit status 137
13 verbose stack     at EventEmitter.<anonymous> (/home/ubuntu/.nvm/versions/node/v8.15.1/lib/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> (/home/ubuntu/.nvm/versions/node/v8.15.1/lib/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 angular-dine-chain@0.0.1
15 verbose cwd /home/ubuntu/fabric-dev-servers/angular-dine-chain
16 verbose Linux 4.15.0-1021-aws
17 verbose argv "/home/ubuntu/.nvm/versions/node/v8.15.1/bin/node" "/home/ubuntu/.nvm/versions/node/v8.15.1/bin/npm" "start"
18 verbose node v8.15.1
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 137
22 error angular-dine-chain@0.0.1 start: `ng serve --proxy-config proxy.conf.js --host 0.0.0.0`
22 error Exit status 137
23 error Failed at the angular-dine-chain@0.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]

面临的问题与引述here相同。但这没有令人满意的答案。

任何人都可以建议解决此问题的方法,或者向我指出可以提供帮助的任何来源吗?

0 个答案:

没有答案