这就是事情.我的配置是Ubuntu 13.04,Node.js v0.10.5和NPM版本1.2.18.
我试图安装node.js模块"鞋",我收到此错误:
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$
Run Code Online (Sandbox Code Playgroud)
我在谷歌搜索,我发现node-waf被node-gyp取代.我还发现可以安装node-waf
sudo apt-get install nodejs-dev
Run Code Online (Sandbox Code Playgroud)
问题是我使用Chris Lea最新的node.js软件包,它不再包含dev.所以有两种方法可以解决这个问题.
首先,我可以安装node-waf(来自source?),但我不知道如何.
其次,我可以(手动)修复模块,但我不知道如何.
我正在寻找任何解决方案.
Ama*_*Bah 15
node-waf 已被取代 node-gyp
使用以下命令安装node-gyp:
sudo npm install -g node-gyp
注意:要使用node-gyp构建,binding.gyp需要配置文件.例:
{
"targets": [
{
"target_name": "binding",
"sources": [ "src/binding.cc" ]
}
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
31168 次 |
| 最近记录: |