从节点中的mongodb中排除kerberos依赖
我有一个具有mongodb作为依赖项的节点应用程序。 据我所知,mongodb依赖于kerberos的东西,但据我所知,我不需要它。 这会导致问题,因为当我尝试将应用程序部署到aws beanstalk时,由于系统依赖关系,所有地方都会出现窒息和barf。 是否有可能在我的package.json
排除该依赖项?
> kerberos@0.0.17 install /tmp/deployment/application/node_modules/mongodb/node_modules/kerberos > (node-gyp rebuild) || (exit 0) make: Entering directory `/tmp/deployment/application/node_modules/mongodb/node_modules/kerberos/build' CXX(target) Release/obj.target/kerberos/lib/kerberos.o In file included from ../lib/kerberos.cc:1:0: ../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory #include <gssapi/gssapi.h> ^ compilation terminated. make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1 make: Leaving directory `/tmp/deployment/application/node_modules/mongodb/node_modules/kerberos/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/opt/elasticbeanstalk/node-install/node-v4.2.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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.1.10-17.31.amzn1.x86_64 gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v4.2.1-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.2.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /tmp/deployment/application/node_modules/mongodb/node_modules/kerberos gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok
正如你可以在这里阅读
kerberos包是一个C ++扩展,需要在您的系统上安装构build环境。 您必须能够自己构buildnode.js才能编译和安装kerberos模块 。 此外,kerberos模块需要MIT Kerberos包在UNIX操作系统上正确编译。 请咨询您的UNIX操作系统软件包pipe理器安装哪些库。
一个可能的解决scheme是在服务器上安装软件包libkrb5-dev (Debian / Ubuntu)或krb5-devel (CentOS)。
这也可能是节点版本的问题。 我和Kerberos有同样的问题。 请注意,EB默认使用节点4.x。 转至软件configuration页面并更改环境。
- JavaScript – 使用AWS SES发送电子邮件
- AWS Lambda TooManyRequestsException:速率超出
- 有没有人成功地使用Amazon OpsWorks部署节点(快速)应用程序?
- AWS Lambda,API网关返回格式错误的Lambda代理响应502错误
- 如何在Lambda函数中使用AWS.CloudFront.Signer
- 以编程方式创buildaws API密钥并将其添加到单一function的使用计划?
- AWS Api网关:如何处理授权,身份validation,SSO等
- npm全局安装在弹性豆茎上
- 在使用节点JS的DynamoDB查询中recursion提取所有项目