【发布时间】:2016-06-30 05:00:57
【问题描述】:
到目前为止喜欢 MeteorJS。也许那些已经部署到 EB 的人可以帮助我。
我能够成功地将我的应用部署到 EB,但是后续部署失败。在 npm install 阶段,我收到类似这样的错误消息
gyp ERR! node -v v0.10.42
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.5 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.1.17-22.30.amzn1.x86_64
npm ERR! command "/opt/elasticbeanstalk/node-install/node-v0.10.42-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v0.10.42-linux-x64/bin/npm" "--production" "rebuild"
npm ERR! cwd /tmp/deployment/application
npm ERR! node -v v0.10.42
npm ERR! npm -v 1.4.29
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/deployment/application/npm-debug.log
npm ERR! not ok code 0
Running npm install: /opt/elasticbeanstalk/node-install/node-v0.10.42-linux-x64/bin/npm
Setting npm config jobs to 1
我正在使用 Iron CLI 来构建我的应用程序。我用来部署的脚本有点像这样:
rm -Rf build/bundle
iron build --server=https://my-domain.com --architecture os.linux.x86_64
eb deploy prod
项目根目录下的package.json如下所示:
{
"name": "trail-status",
"version": "2.0.0",
"scripts": {
"start": "node build/bundle/main.js"
},
"dependencies": {
"fibers": "1.0.1",
"underscore": "*",
"source-map-support": "*",
"semver": "*",
"bcrypt": "*"
}
}
我试过删除 build/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt 没有太多运气。还尝试从 package.json 中删除 bcrypt。
【问题讨论】:
-
我不确定 Iron build 在后台做了什么,但您是否在相同的基础架构 + 节点版本上运行 npm 安装?
标签: node.js meteor amazon-elastic-beanstalk