Javascript Kadira/mup.js错误:找不到模块';fbjs/lib/invariant';
$npm-v 3.10.3 $node-v v4.5.0 我试图从kadirahq/mup设置mup.js,但在 cd.部署 mup设置Javascript Kadira/mup.js错误:找不到模块';fbjs/lib/invariant';,javascript,meteor,Javascript,Meteor,$npm-v 3.10.3 $node-v v4.5.0 我试图从kadirahq/mup设置mup.js,但在 cd.部署 mup设置 Started TaskList: Setup Docker [138.68.141.215] - setup docker [138.68.141.215] - setup docker: SUCCESS Started TaskList: Setup Meteor [138.68.141.215] - Setup Environment Started
Started TaskList: Setup Docker
[138.68.141.215] - setup docker
[138.68.141.215] - setup docker: SUCCESS
Started TaskList: Setup Meteor
[138.68.141.215] - Setup Environment
Started TaskList: Setup Mongo
[138.68.141.215] - setup environment
[138.68.141.215] - setup environment: SUCCESS
[138.68.141.215] - copying mongodb.conf
[138.68.141.215] - copying mongodb.conf: SUCCESS
[138.68.141.215] - Setup Environment: SUCCESS
Started TaskList: Start Mongo
[138.68.141.215] - start mongo
[138.68.141.215] - start mongo: SUCCESS
我不知道它的设置是否正确,只返回下一行,而不是mupx设置,它提供了成功的mupx设置消息
任何人都可以提供一个工作的mup.js的实际例子,它被部署到他们自己的主机上(没有数字海洋的例子等),因为我已经这样做了
一个工作的mup.js,有真正的mongo_url、mongo_oplog、root_url,因为我已经尝试过了,但还没有成功
编辑:
MacOSX
流星1.4.1.1
添加了mysparkapp/.deploy/mup.js的示例:
module.exports = {
servers: {
one: {
host: 'IP address',
username: 'root',
password: 'xxxxxx!'
//pem: "/Users/seb/.ssh/id_rsa"
// or leave blank for authenticate from ssh-agent
}
},
meteor: {
name: 'myappdemo',
//path: '..',
path: '/Users/seb/myappdemo/',
docker: {
image: 'abernix/meteord:base'
},
servers: {
one: {}
},
buildOptions: {
serverOnly: true
},
env: {
PORT: 63830,
ROOT_URL: 'http://localhost:63830',
MONGO_URL: 'mongodb://localhost/meteor'
},
//dockerImage: 'kadirahq/meteord'
dockerImage: 'abernix/meteord:base',
deployCheckWaitTime: 60
},
mongo: {
oplog: true,
port: 27017,
servers: {
one: {},
},
},
};
然后
$mup设置
Started TaskList: Setup Docker
[138.68.141.215] - setup docker
[138.68.141.215] - setup docker: SUCCESS
Started TaskList: Setup Meteor
[138.68.141.215] - Setup Environment
Started TaskList: Setup Mongo
[138.68.141.215] - setup environment
[138.68.141.215] - setup environment: SUCCESS
[138.68.141.215] - copying mongodb.conf
[138.68.141.215] - copying mongodb.conf: SUCCESS
[138.68.141.215] - Setup Environment: SUCCESS
Started TaskList: Start Mongo
[138.68.141.215] - start mongo
[138.68.141.215] - start mongo: SUCCESS
$mup部署
Building App Bundle Locally
Started TaskList: Pushing Meteor
[138.68.141.215] - Pushing Meteor App Bundle to The Server
[138.68.141.215] - Pushing Meteor App Bundle to The Server: SUCCESS
[138.68.141.215] - Pushing the Startup Script
[138.68.141.215] - Pushing the Startup Script: SUCCESS
Started TaskList: Configuring Meteor Environment Variables
[138.68.141.215] - Sending Environment Variables
[138.68.141.215] - Sending Environment Variables: SUCCESS
Started TaskList: Start Meteor
[138.68.141.215] - Start Meteor
[138.68.141.215] - Start Meteor: SUCCESS
[138.68.141.215] - Verifying Deployment
[138.68.141.215] x Verifying Deployment: FAILED
-----------------------------------STDERR-----------------------------------
: "1.2.8"
}
npm WARN meteor-dev-bundle@0.0.0 No description
npm WARN meteor-dev-bundle@0.0.0 No repository field.
npm WARN meteor-dev-bundle@0.0.0 No license field.
=> Starting meteor app on port:80
/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:16: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'
-----------
但后来出现错误:找不到模块“fbjs/lib/invariant”再次出现
解决方案(对我来说)
确保使用应用程序位置的完整路径-/users/。。mup.js不喜欢~/
否则,发布一个你的mup.js示例,我会告诉你哪里出了问题。Hi@led刚刚添加了mup.js示例,提前谢谢。你提到过mup.js不喜欢相对路径,那么它是否也意味着路径:“…”也不起作用?我只是在mac上从根目录定义了路径,类似于
/Users/me/development/meteorapp
过去几天我也遇到了这个问题。对我来说,这似乎与添加react路由器ssr有关。你能解决它吗?我终于解决了npm安装-g bcrypt nodejs和npm卸载-g bcrypt。谢谢你的回复!这并没有解决我的特定问题,但如果其他人有类似问题,请随时查看:
$npm install -g bcrypt-nodejs &&
$npm uninstall -g bcrypt