node.js - Vagrant:安装错误 'gulp'

标签 node.js gulp vagrant

我正在运行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 。

  1. Node 是否作为安装的一部分安装?
  2. Node 路径设置正确吗?

关于node.js - Vagrant:安装错误 'gulp',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26620467/

相关文章:

javascript - 当目录名包含空格时使用 BAT 文件启动 NodeJS http-服务器

javascript - NodeJS 异步库不会异步发送请求

javascript - CDATA 显示在我的 HTML 页面中。为什么?

java - 如何设置Maven依赖的URL

windows - Vagrant shell provisioner 在 Mac 主机上失败但在 Windows 主机上工作

javascript - Ajax 将数据对象发送到 NodeJs 服务器时失败

node.js - 在 req,res 中调用函数

gulp - 修改gulpfile.js(gulp 4.0)

javascript - 为什么 vinyl.isVinyl() 对于 gulp 发出的乙烯基文件返回 false?

vagrant - 如何从另一个 virtualbox guest 访问 vagrant guest ?