2014-10-28 77 views
1

我正在运行vagrant provision,并且最后一步失败,并显示“错误安装'gulp'”。见下文。Vagrant:错误安装'gulp'

这是什么意思,以及如何解决它?没有人跑这个流浪脚本曾经有过这个问题。

Stderr from the command: 

stdin: is not a tty 
[ERROR ] Command 'npm install --silent --json --global "gulp"' failed with return code: 1 
[ERROR ] stdout: 
> [email protected] install /usr/local/lib/node_modules/gulp/node_modules/v8flags 
> node fetch.js 
[ERROR ] stderr: sh: 1: node: not found 
[ERROR ] Error installing 'gulp': sh: 1: node: not found 

我尝试手动安装$ sudo npm install --json --global "gulp"但它给了我一个错误:

> [email protected] install /usr/local/lib/node_modules/gulp/node_modules/v8flags 
> node fetch.js 

sh: 1: node: not found 
npm WARN This failure might be due to the use of legacy binary "node" 
npm WARN For further explanations, please read 
/usr/share/doc/nodejs/README.Debian 
+0

我找到了解决办法:HTTP:// stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu – Vad 2014-10-29 21:14:30

回答

0

NPM是Node.js的安装程序包,你的错误消息指出节点找不到。

  1. 是否将节点安装为设置的一部分?
  2. 节点的路径是否正确设置?
+0

我的错误状态npm无法安装吞咽。当我尝试手动安装gulp时,出现访问错误。它看起来像这个目录不能被创建:/ usr/local/lib/node_modules/gulp/node_modules/v8flags – Vad 2014-10-29 14:37:24

+0

对不起,误读错误。我认为这是一个文件权利问题。当我使用包管理器安装节点时,我遇到过这种情况。在全球范围内安装gulp时,可能会使用sudo进行快速而肮脏的修复。 – 2014-10-29 15:06:17

+0

谢谢。我试过了,更新已添加到上面的问题中。 – Vad 2014-10-29 15:27:08