我正在运行vagrant provision
,最后一步失败,并显示“安装'gulp'时出错”。见下文。
这是什么意思以及如何解决?以前运行这个 Vagrant 脚本的人都没有遇到过这个问题。
Stderr from the command:
stdin: is not a tty
[ERROR ] Command 'npm install --silent --json --global "gulp"' failed with return code: 1
[ERROR ] stdout:
> v8flags@1.0.1 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"
但它给了我一个错误:
> v8flags@1.0.1 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
最佳答案
npm 是 Node.js 的软件包安装程序,并且您的错误消息指出找不到 Node 。
- Node 是否作为安装的一部分安装?
- Node 路径设置正确吗?
关于node.js - Vagrant:安装错误 'gulp',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26620467/