我正在尝试在Ubuntu kadirahq/mup
上使用16.04
部署我的应用程序到也运行Ubuntu 16.04
的Digital Ocean Droplet。
我的应用程序位于Meteor 1.4.1.1
,并使用节点4.5.0
报告。
我的机器的节点版本为6.6.0
。
我阅读了mup faq并尝试增加deployCheckWaitTime
,并尝试使用高达2000
的值且未进行任何更改。
在使用mup
和mupx
的较早版本之前,我已经成功将此应用程序部署到了这个Droplet,但开始出现问题并决定升级到新版本。
我也有关于js-bson
的提示,我已经在这里进行了记录,似乎与之相关:
Meteor: js-bson: Failed to load c++ bson extension, using pure JS version
我最初使用的是dockerImage: 'kadirahq/meteord'
,但是在阅读this issue comment by abernix之后,将其更改为dockerImage: 'abernix/meteord:base'
,这成功解决了该问题,但用此替代了它。
当我运行mup setup
时,一切都成功运行。mup deploy
成功运行所有步骤,直到“验证部署”步骤为止:
(node:2785) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error:
它吐出上面的内容,然后是一堆也吐出到日志中的东西,因此我将其放在下面。
mup logs --tail=200
的输出是巨大的,并且每次运行时都会改变,但这减少了我或多或少认为它重复的内容:Error: $ROOT_URL, if specified, must be an URL
at Error (native)
at packages/meteor/url_server.js:8:1
at packages/meteor/url_server.js:19:1
at /bundle/bundle/programs/server/packages/meteor.js:1365:3
at /bundle/bundle/programs/server/boot.js:292:10
at Array.forEach (native)
at Function._.each._.forEach (/bundle/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
at /bundle/bundle/programs/server/boot.js:128:5
> [email protected] install /bundle/bundle/programs/server
> node npm-rebuild.js
> [email protected] install /bundle/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory '/bundle/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/bson/build'
CXX(target) Release/obj.target/bson/ext/bson.o
bson.target.mk:94: recipe for target 'Release/obj.target/bson/ext/bson.o' failed
make: Leaving directory '/bundle/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/bson/build'
> [email protected] install /bundle/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory '/bundle/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/kerberos/build'
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
kerberos.target.mk:100: recipe for target 'Release/obj.target/kerberos/lib/kerberos.o' failed
make: Leaving directory '/bundle/bundle/programs/server/npm/node_modules/meteor/cfs_gridfs/node_modules/mongodb/node_modules/kerberos/build'
// references to a million node modules
> [email protected] install /bundle/bundle/programs/server/npm/node_modules/bcrypt
> node-gyp rebuild
make: Entering directory '/bundle/bundle/programs/server/npm/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
make: Leaving directory '/bundle/bundle/programs/server/npm/node_modules/bcrypt/build'
[email protected] /bundle/bundle/programs/server/npm/node_modules/bcrypt
// references to a million different node modules
{
"meteor-dev-bundle": "0.0.0",
"npm": "3.10.5",
"ares": "1.10.1-DEV",
"http_parser": "2.5.2",
"icu": "56.1",
"modules": "46",
"node": "4.4.7",
"openssl": "1.0.2h",
"uv": "1.8.0",
"v8": "4.5.103.36",
"zlib": "1.2.8"
}
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
=> Starting meteor app on port:80
/bundle/bundle/programs/server/boot.js:333
}).run();
这是我的
.deploy/mup.js
文件的相关部分:meteor: {
name: 'boxes',
path: '/home/blaine/Business/Boxes/boxes/',
servers: {
one: {}
},
buildOptions: {
serverOnly: true,
},
env: {
ROOT_URL: 'example.com',
MONGO_URL: 'mongodb://localhost/meteor'
},
// dockerImage: 'kadirahq/meteord'
dockerImage: 'abernix/meteord:base',
deployCheckWaitTime: 60
},
mongo: {
oplog: true,
port: 27017,
servers: {
one: {},
},
},
我还尝试通过运行
meteor npm uninstall bcrypt
并将bcrypt软件包从package.json
依赖项:"bcrypt": "^0.8.7"
中删除来删除bcrypt软件包,并通过查看我的node_modules目录来验证它已消失。我用meteor bcrypt package代替了它。不用找了。 最佳答案
事实证明,这比看起来要简单得多。与大节点模块相关的输出有点像红鲱鱼,我以为是那样。但是,相关的部分是:Error: $ROOT_URL, if specified, must be an URL
。
我的ROOT_URL
没有包含http://
协议。添加它解决了问题。
关于node.js - kadirahq/mup无法验证部署,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39650959/