Exit status 1 npm-lifecycle\index.js:285:16

2019-02-18 04:32发布

0 silly lifecycle stork.spa@1.0.0~build.prod: Args: [ '/d /s /c',
10 silly lifecycle   'gulp build.prod --color --env-config prod --build-type prod --base /cli/ --theme dark' ]
11 silly lifecycle stork.spa@1.0.0~build.prod: Returned: code: 1  signal: null
12 info lifecycle stork.spa@1.0.0~build.prod: Failed to exec build.prod script
13 verbose stack Error: stork.spa@1.0.0 build.prod: `gulp build.prod --color --env-config prod --build-type prod --base /cli/ --theme dark`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:285: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:\Users\user\AppData\Roaming\npm\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:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid stork.spa@1.0.0
15 verbose cwd C:\dev\JWT\Mvc\StorkCMS\Stork.SPA
16 verbose Windows_NT 10.0.17025
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build.prod"
18 verbose node v8.9.3
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error stork.spa@1.0.0 build.prod: `gulp build.prod --color --env-config prod --build-type prod --base /cli/ --theme dark`
22 error Exit status 1
23 error Failed at the stork.spa@1.0.0 build.prod script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

and in AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib there is no index.js only spawn.js

1条回答
何必那么认真
2楼-- · 2019-02-18 05:20

If you are using rxjs library, then make sure you change the value of

import { Observable } from 'rxjs/Rx';

to

import { Observable } from 'rxjs/observable';

across your workspace

And then make sure you revert/upgrade your typescript to v 2.3.4 and rxjs to 5.6.0. Do a npm clean cache and build again.

This worked for me. It seems there is some problem in compatibility of rxjs library and typescript versions.

Hope this helps.

查看更多
登录 后发表回答