我使用MUP部署,万事如意伟大,直到我加入reactrouter:react-router-ssr
流星包。 我可以在本地运行它,但我得到以下错误,当我部署:
-----------------------------------STDERR-----------------------------------
pproximately three times slower than the native implementation.
In order to use the native implementation instead, run
meteor npm install --save bcrypt
in the root directory of your application.
/bundle/bundle/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
Error: Cannot find module 'fbjs/lib/invariant'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/bundle/bundle/programs/server/npm/node_modules/react/lib/PooledClass.js:14:17)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Module.Mp.load (/bundle/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/reify/node/runtime.js:16:23)
at Function.Module._load (module.js:300:12)
=> Redeploying previous version of the app
-----------------------------------STDOUT-----------------------------------
To see more logs type 'mup logs --tail=50'
----------------------------------------------------------------------------
预计bycrypt错误,因为故宫的版本显然不是与我使用的泊坞窗的图像兼容abernix/meteord:base
,我也得到当地一个类似的问题,它运行良好,并部署精也。 当我再补充一点出现的错误react-router-ssr
封装,所以我觉得fbjs/lib/invariant
我收到错误是由于这一点。
我mup.js是:
module.exports = {
servers: {
one: {
host: '54.69.x.x',
username: 'ubuntu',
pem: "/Users/me/.ssh/meteor.pem"
}
},
meteor: {
name: 'App',
path: '/Users/me/development/meteor',
servers: {
one: {}
},
buildOptions: {
serverOnly: true,
debug: true
},
enableUploadProgressBar: true,
env: {
ROOT_URL: 'http://54.69.x.x',
MONGO_URL: 'mongodb://user:pass@mlab.com:39685/production'
},
dockerImage: 'abernix/meteord:base',
deployCheckWaitTime: 60
},
mongo: {
oplog: true,
port: 27017,
servers: {
one: {},
},
},
};
感谢您的帮助,您可以提供。 顺便说一句,如果有谁知道如何强制MUP连接到我的蒙戈的URL,而不是在本地建立蒙戈,这将是真棒太知道,因为setupMongo的位置:假似乎是MUP与mupx不同。 谢谢!!
编辑:如果我手动添加FBJS到的package.json库,该错误会消失,但我得到一个新问题:
Npm.require (/bundle/bundle/programs/server/boot.js:198:17)
at options.fallback (packages/modules-runtime/modules-runtime.js:21:1)
at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:88:1)
at Module.Mp.import (/bundle/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime.js:70:16)
at meteorInstall.imports.ui.components.blogs.blog.js (/bundle/bundle/programs/server/app/app.js:3878:866)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at Module.Mp.import (/bundle/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime.js:70:16)
at meteorInstall.imports.ui.layouts.blogs.blogsList.js (imports/ui/layouts/application/app.js:8:8)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)