【问题标题】:While starting npm, I'm getting these error启动 npm 时,出现这些错误
【发布时间】:2015-08-28 22:03:31
【问题描述】:

0 信息如果它以 ok 结尾,它就会起作用

1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]

2 info using npm@2.11.3

3 info using node@v0.12.7

4 verbose run-script [ 'prestart', 'start', 'poststart' ]

5 info prestart telcodna@0.0.0

6 info start telcodna@0.0.0

7 verbose unsafe-perm in lifecycle true

8 info telcodna@0.0.0 Failed to exec start script

9 verbose stack Error: telcodna@0.0.0 start: `node ./bin/www`

9 verbose stack Exit status 1

9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)

9 verbose stack     at EventEmitter.emit (events.js:110:17)

9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)

9 verbose stack     at ChildProcess.emit (events.js:110:17)

9 verbose stack     at maybeClose (child_process.js:1015:16)

9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

10 verbose pkgid telcodna@0.0.0

11 verbose cwd /usr/local/node-v0.12.7/telcodna

12 error Linux 3.19.0-26-generic

13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"

14 error node v0.12.7

15 error npm  v2.11.3

16 error code ELIFECYCLE

17 error telcodna@0.0.0 start: `node ./bin/www`

17 error Exit status 1

18 error Failed at the telcodna@0.0.0 start script 'node ./bin/www'.

18 error This is most likely a problem with the telcodna package,

18 error not with npm itself.

18 error Tell the author that this fails on your system:

18 error     node ./bin/www

18 error You can get their info via:

18 error     npm owner ls telcodna

18 error 

上面可能还有额外的日志输出。

enter code here

19 verbose exit [ 1, true 

请就这个问题向我提出建议

【问题讨论】:

  • 你安装了 nodejs 吗?

标签: node.js ubuntu npm


【解决方案1】:

如果您使用nodejs 命令而不是node 命令,如果任何依赖项使用node 命令,则可能会出现此错误。

执行启动脚本后进入退出状态:

8 info telcodna@0.0.0 Failed to exec start script
9 verbose stack Error: telcodna@0.0.0 start: `node ./bin/www`
9 verbose stack Exit status 1

您可以在终端上使用该命令创建符号链接:

sudo ln -s which nodejs /usr/bin/node

我更喜欢你用 nvm 在 ubuntu 上安装 node.js。您还可以拥有控制节点版本。

【讨论】:

  • 感谢您喜欢 korukut 的回复。
猜你喜欢
  • 2014-12-02
  • 2023-02-16
  • 1970-01-01
  • 2021-11-14
  • 2021-12-14
  • 1970-01-01
  • 2020-07-03
  • 2020-03-03
  • 1970-01-01
相关资源
最近更新 更多