Npm在node-gyp重建时安装失败

时间:2016-06-28 19:27:03

标签: node.js npm node-gyp ubuntu-16.04

似乎这是一个非常常见的问题,但我研究过的解决方案都没有为我解决。

我正在运行Ubuntu 16.04,Node 4.2.6,NPM版本3.5.2。我怀疑我的应用程序中有一个依赖项不再适用于这些版本,但我不确定如何快速识别它。

当我在我的应用程序上运行npm install时,我得到以下内容:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-28-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/gary/Work/ui-programmatic/node_modules/bufferutil
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN install:bufferutil@1.1.0 bufferutil@1.1.0 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.1.0 Exit

我已尝试重新安装node和npm。

1 个答案:

答案 0 :(得分:0)

我能够使用

识别不兼容的依赖项
npm list

从应用程序目录中。这表明我使用不兼容的bufferutil版本有一个未满足的依赖。

当我将依赖项更新到最新版本时,npm install运行时没有错误。希望这有助于某人。

相关问题