2017-03-06 111 views
0

我工作Angular2 3-4個星期前,不停的項目按原樣雲。問題是現在項目不會運行,在啓動時拋出這個錯誤。NPM開始拋出錯誤

我認爲這個問題是精簡版的服務器上,但我沒有更新節點模塊和故宮。這是我的代碼或npm的問題嗎?

0 info it worked if it ends with ok 
1 verbose cli [ '/home/ubuntu/.nvm/versions/node/v4.6.1/bin/node', 
1 verbose cli '/home/ubuntu/.nvm/versions/node/v4.6.1/bin/npm', 
1 verbose cli 'start' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose run-script [ 'prestart', 'start', 'poststart' ] 
5 info lifecycle [email protected]~prestart: [email protected] 
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing 
7 info lifecycle [email protected]~start: [email protected] 
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 
9 verbose lifecycle [email protected]~start: PATH: /home/ubuntu/.nvm/versions/node/v4.6.1/lib/node_modules/npm/bin/node-gyp-bin:/home/ubuntu/workspace/node_modules/.bin:/home/ubuntu/.nvm/versions/node/v4.6.1/bin:/usr/local/rvm/gems/ruby-2.3.0/bin:/usr/local/rvm/gems/[email protected]/bin:/usr/local/rvm/rubies/ruby-2.3.0/bin:/mnt/shared/bin:/home/ubuntu/workspace/node_modules/.bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mnt/shared/sbin:/opt/gitl:/opt/go/bin:/mnt/shared/c9/app.nw/bin:/usr/local/rvm/bin 
10 verbose lifecycle [email protected]~start: CWD: /home/ubuntu/workspace 
11 silly lifecycle [email protected]~start: Args: [ '-c', 'npm run lite' ] 
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 
13 info lifecycle [email protected]~start: Failed to exec start script 
14 verbose stack Error: [email protected] start: `npm run lite` 
14 verbose stack Exit status 1 
14 verbose stack  at EventEmitter.<anonymous> (/home/ubuntu/.nvm/versions/node/v4.6.1/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) 
14 verbose stack  at emitTwo (events.js:87:13) 
14 verbose stack  at EventEmitter.emit (events.js:172:7) 
14 verbose stack  at ChildProcess.<anonymous> (/home/ubuntu/.nvm/versions/node/v4.6.1/lib/node_modules/npm/lib/utils/spawn.js:40:14) 
14 verbose stack  at emitTwo (events.js:87:13) 
14 verbose stack  at ChildProcess.emit (events.js:172:7) 
14 verbose stack  at maybeClose (internal/child_process.js:829:16) 
14 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 
15 verbose pkgid [email protected] 
16 verbose cwd /home/ubuntu/workspace 
17 error Linux 4.8.8-c9 
18 error argv "/home/ubuntu/.nvm/versions/node/v4.6.1/bin/node" "/home/ubuntu/.nvm/versions/node/v4.6.1/bin/npm" "start" 
19 error node v4.6.1 
20 error npm v4.3.0 
21 error code ELIFECYCLE 
22 error errno 1 
23 error [email protected] start: `npm run lite` 
23 error Exit status 1 
24 error Failed at the [email protected] start script 'npm run lite'. 
24 error Make sure you have the latest version of node.js and npm installed. 
24 error If you do, this is most likely a problem with the angular2_try package, 
24 error not with npm itself. 
24 error Tell the author that this fails on your system: 
24 error  npm run lite 
24 error You can get information on how to open an issue for this project with: 
24 error  npm bugs angular2_try 
24 error Or if that isn't available, you can get their info via: 
24 error  npm owner ls angular2_try 
24 error There is likely additional logging output above. 
25 verbose exit [ 1, true ] 

PS:我是Angular2的新手。

+0

我覺得你的NodeJS版本太舊。 – sandrooco

回答

1

的問題是與lite-server設置端口。

幾個星期前,我正在運行默認精簡版,服務器端口,3000上的應用程序。但我改變了對HTTP端口,80。我忘記了。

現在我要做的就是sudo npm start