node.js – GYP ERR!构建错误.堆栈错误:’make’失败,退出代码为2

前端之家收集整理的这篇文章主要介绍了node.js – GYP ERR!构建错误.堆栈错误:’make’失败,退出代码为2前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我目前正在研究一个nodejs Web应用程序我在使用云代工厂在线推送应用程序时遇到了麻烦.我对错误做了一些研究,似乎可能有一些安装包有一些冲突.

这是package.json文件.

{
  "dependencies": {
    "c3": "^0.4.12","cfenv": "1.0.0","cloudant": "^1.8.0","dygraphs": "^2.0.0","express": "4.5.1","getmac": "1.0.6","http": "0.0.0","mqtt": "1.0.5","properties": "1.2.1","save": "^2.3.0","sockjs": "0.3.9","websocket-multiplex": "0.1.x"
  },"description": "description.","license": "UNLICENSED","main": "app.js","repository": {
    "type": "git","url": "<gitUrl>"
  }
}

这是我尝试通过云代工推送应用程序时遇到的错误.在删除node_modules文件夹的所有内容后,我在安装npm时发生类似的错误.

../src/bufferutil.cc:32:50: error: call of overloaded 'NODE_SET_METHOD(v8::Local<v8::FunctionTemplate>&,const char [6],void (&)(const v8::FunctionCallbackInfo<v8::Value>&))' is ambiguous
     NODE_SET_METHOD(t,"merge",BufferUtil::Merge);

../src/bufferutil.cc:32:50: note: candidates are:
In file included from ../src/bufferutil.cc:8:0:
/root/.node-gyp/8.0.0/include/node/node.h:257:13: note: void node::NODE_SET_METHOD(v8::Local<v8::Template>,const char*,v8::FunctionCallback)
 inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,^
/root/.node-gyp/8.0.0/include/node/node.h:270:13: note: void node::NODE_SET_METHOD(v8::Local<v8::Object>,v8::FunctionCallback)
 inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,^
bufferutil.target.mk:95: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' Failed
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
make: Leaving directory '/home/WibiSmart-Bluemix-App/node_modules/bufferutil/build'

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/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.4.30-ti-r64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/WibiSmart-Bluemix-App/node_modules/bufferutil
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok

有没有其他人遇到过这个问题,或者知道如何修复它?

解决方法

找出问题所在.一些npm软件包不是最新的.我修改了package.json以安装所有软件包的所有最新版本,并修复了错误.
原文链接:https://www.f2er.com/nodejs/241267.html

猜你在找的Node.js相关文章