GYP 错误!构建错误.堆栈错误:'make' 失败,退出代码为 2 [英] GYP ERR! build error. stack Error: 'make' failed with exit code 2

查看:75
本文介绍了GYP 错误!构建错误.堆栈错误:'make' 失败,退出代码为 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个 nodejs Web 应用程序,但在使用 Cloud Foundry 在线推送应用程序时遇到了问题.我对错误进行了一些研究,似乎正在安装的某些软件包可能存在一些冲突.

I am currently working on a nodejs web application I am having trouble pushing the application online with cloud foundry. I did some research on the errors and it seems that maybe some of the packages being installed have some conflicts.

这是 package.json 文件.

This is the package.json file.

{
  "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 install 时,会发生类似的错误.

This is the error I encounter when I try to push the application via cloud foundry. This similar error happens when I npm install after deleting all the content of the node_modules folder.

../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>, const char*, 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

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

Did anyone else encounter this issue, or knows how to fix it?

推荐答案

找出问题所在.一些 npm 包不是最新的.我修改了 package.json 以安装所有包的所有最新版本,错误已修复.

Figured out the issue. Some of the npm packages were not up to date. I modified the package.json to install all the latest versions of all packages and the error was fixed.

这篇关于GYP 错误!构建错误.堆栈错误:'make' 失败,退出代码为 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆