节点waf:未找到 [英] Node-waf: not found
问题描述
事情就是这样.我的配置是 Ubuntu 13.04、Node.js v0.10.5 和 NPM 版本 1.2.18.
Here is the thing. My configuration is Ubuntu 13.04, Node.js v0.10.5 and NPM version 1.2.18.
我正在尝试安装 node.js 模块shoe",但出现此错误:
I am trying to install node.js module "shoe" and I got this error:
marek@nassenfuss:/media/tc/examples/node/05.01$ sudo npm install
npm http GET https://registry.npmjs.org/shoe
npm http 304 https://registry.npmjs.org/shoe
npm http GET https://registry.npmjs.org/node-uuid/1.3.3
npm http GET https://registry.npmjs.org/faye-websocket/0.4.0
npm http GET https://registry.npmjs.org/rbytes/0.0.2
npm http 304 https://registry.npmjs.org/node-uuid/1.3.3
npm http 304 https://registry.npmjs.org/rbytes/0.0.2
npm http 304 https://registry.npmjs.org/faye-websocket/0.4.0
> rbytes@0.0.2 install /media/tc/examples/node/05.01/node_modules/shoe/node_modules/sockjs/node_modules/rbytes
> node-waf configure build
sh: 1: node-waf: not found
npm WARN optional dep failed, continuing rbytes@0.0.2
shoe@0.0.10 node_modules/shoe
├── sockjs-client@0.0.0-unreleasable
└── sockjs@0.3.1 (node-uuid@1.3.3, faye-websocket@0.4.0)
marek@nassenfuss:/media/tc/examples/node/05.01$
我在谷歌上搜索,发现 node-waf 被 node-gyp 替换了.我还发现 node-waf 可以用
I was googling and I found that node-waf was replaced with node-gyp. I also found that node-waf can be installed with
sudo apt-get install nodejs-dev
问题是我正在使用 Chris Lea 的最新 node.js 包不再包括 dev .所以有两种方法可以解决这个问题.
The problem is that I am using the lastest node.js package by Chris Lea which does not include dev anymore. So there are two options to solve the problem.
首先,我可以安装 node-waf(从源代码?),但我不这样做.
First, I could install node-waf (from source?), but I do not how.
其次,我可以(手动)修复模块,但我不知道如何.
Second, I could (manually) repair the module, but I do not how.
我正在寻找任何解决方案.
I am looking for any solution.
推荐答案
node-waf
已替换为 node-gyp
使用以下命令安装 node-gyp:sudo npm install -g node-gyp
Install node-gyp using:
sudo npm install -g node-gyp
注意:要使用 node-gyp 构建,需要配置文件 binding.gyp
.示例:
Note: To build with node-gyp the configuration file binding.gyp
is required.
Example:
{
"targets": [
{
"target_name": "binding",
"sources": [ "src/binding.cc" ]
}
]
}
这篇关于节点waf:未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!