npm start 抛出与精简版服务器相关的未知错误
npm start is throwing unknown error related to lite server
我 3-4 周前在 Angular2
工作,并在云上保持项目原样。现在的问题是项目不会 运行,在启动时抛出此错误。
我认为问题出在 lite-server 上,但我确实更新了节点模块和 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 npm@4.3.0
3 info using node@v4.6.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular2_try@0.0.1~prestart: angular2_try@0.0.1
6 silly lifecycle angular2_try@0.0.1~prestart: no script for prestart, continuing
7 info lifecycle angular2_try@0.0.1~start: angular2_try@0.0.1
8 verbose lifecycle angular2_try@0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle angular2_try@0.0.1~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/ruby-2.3.0@global/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 angular2_try@0.0.1~start: CWD: /home/ubuntu/workspace
11 silly lifecycle angular2_try@0.0.1~start: Args: [ '-c', 'npm run lite' ]
12 silly lifecycle angular2_try@0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle angular2_try@0.0.1~start: Failed to exec start script
14 verbose stack Error: angular2_try@0.0.1 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 angular2_try@0.0.1
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 angular2_try@0.0.1 start: `npm run lite`
23 error Exit status 1
24 error Failed at the angular2_try@0.0.1 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 ]
问题出在 lite-server
设置的端口上。
几周前,我是 运行 默认精简服务器端口 3000
上的应用程序。但我将其更改为 http 端口 80
。我忘记了。
现在我所要做的就是sudo npm start
我 3-4 周前在 Angular2
工作,并在云上保持项目原样。现在的问题是项目不会 运行,在启动时抛出此错误。
我认为问题出在 lite-server 上,但我确实更新了节点模块和 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 npm@4.3.0
3 info using node@v4.6.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle angular2_try@0.0.1~prestart: angular2_try@0.0.1
6 silly lifecycle angular2_try@0.0.1~prestart: no script for prestart, continuing
7 info lifecycle angular2_try@0.0.1~start: angular2_try@0.0.1
8 verbose lifecycle angular2_try@0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle angular2_try@0.0.1~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/ruby-2.3.0@global/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 angular2_try@0.0.1~start: CWD: /home/ubuntu/workspace
11 silly lifecycle angular2_try@0.0.1~start: Args: [ '-c', 'npm run lite' ]
12 silly lifecycle angular2_try@0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle angular2_try@0.0.1~start: Failed to exec start script
14 verbose stack Error: angular2_try@0.0.1 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 angular2_try@0.0.1
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 angular2_try@0.0.1 start: `npm run lite`
23 error Exit status 1
24 error Failed at the angular2_try@0.0.1 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 ]
问题出在 lite-server
设置的端口上。
几周前,我是 运行 默认精简服务器端口 3000
上的应用程序。但我将其更改为 http 端口 80
。我忘记了。
现在我所要做的就是sudo npm start