CNode

升级node到v6.9.1之后, 安装模块时 node-gyp出现编译不过去了,请问各位这问题怎么解决?多谢!

问答
Ffengyh13发布于10 年前最后回复10 年前2 回复7820 浏览0 收藏

node version: v6.9.1 node-gyp version: 3.4.0 npm version: 3.10.8

when I install mosca, this issue appear:

gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 3.13.0-100-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/project/secretchat_server/node_modules/ascoltatori/node_modules/zmq gyp ERR! node -v v6.9.1 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok

============================split line==================================== gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 3.13.0-100-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/project/secretchat_server/node_modules/zmq gyp ERR! node -v v6.9.1 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok

查看回复

回复 (2)

C
chrischjh#1·10 年前

我也遇到类似问题

F
fengyh13#2·10 年前
引用 chrischjh我也遇到类似问题

@chrischjh 已经解决,npm 的默认包不是最近的,升级一下就OK了

参与回复
登录后即可参与回复。登录