【发布时间】:2017-09-26 07:50:32
【问题描述】:
有人知道如何在 IBM Bluemix 上部署流星 1.4+ 吗?
似乎没有任何效果。
meteor v 1.4.4.1
node.js v4.8.1
npm 4.2.0
mongodb 3.4.0
我尝试了 demeteorizer github.com/XervoIO/demeteorizer,但它不知道需要设置哪个版本的 nodejs。
我尝试了流星 buildpack github.com/ind1go/bluemix-buildpack-meteor,但它已有 4 年以上的历史了,它无法与流星 1.4+ 一起使用。
我尝试使用标准 buildpack 将应用程序作为 node.js 运行,我尝试了另一个来自 scalingo (github.com/Scalingo/nodejs-buildpack) 的应用程序,它应该更好地支持流星。即使我无法成功部署,这种方法也是效果最好的方法。方法说明如下:
- npm install --production
- 流星重置
- meteor build /build --architecture os.linux.x86_64
- cd /build && tar xvzf devance.tar.gz && chmod -R +w+x *
- cd /build/bundle/programs/server/ && npm install
-
cd /build/bundle 并创建包含内容的 package.json:
{ "name": "myname", "version": "1.0.0", "dependencies": { "meteor-promise": "0.8.0", "fibers": "1.0.15", "promise": "7.1.1", "underscore": "1.5.2", "source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e", "semver": "4.1.0", "node-gyp": "3.6.0", "node-pre-gyp": "0.6.34" }, "scripts": { "start": "node main.js" }, "engines": { "node": "4.8.1", "npm": "4.2.0" }, "private": true } - 我在本地测试“node main.js”,它可以工作
-
cf push my-app -b https://github.com/Scalingo/nodejs-buildpack.git 失败并显示来自 Bluemix CF 的以下错误消息。
ERR /home/vcap/app/programs/server/boot.js:356 ERR }).run(); ERR ^ ERR Error: Can't find npm module 'meteor-deque'. Did you forget to call 'Npm.depends' in package.js within the 'meteor' package? ERR at Object.require (/home/vcap/app/programs/server/boot.js:200:17) ERR at packages/meteor.js:677:32 ERR at packages/meteor.js:846:4 ERR at packages/meteor.js:1380:3 ERR at /home/vcap/app/programs/server/boot.js:303:34 ERR at Array.forEach (native) ERR at Function._.each._.forEach (/home/vcap/app/node_modules/underscore/underscore.js:79:11) ERR at /home/vcap/app/programs/server/boot.js:128:5 ERR at /home/vcap/app/programs/server/boot.js:352:5 ERR at Function.run (/home/vcap/app/programs/server/profile.js:510:12) OUT Exit status 1
它显然没有找到隐秘的流星包。任何解决方案都会有所帮助。
谢谢
【问题讨论】: