首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Kadira/mup.js错误:找不到模块'fbjs/lib/invariant‘

Kadira/mup.js错误:找不到模块'fbjs/lib/invariant‘
EN

Stack Overflow用户
提问于 2016-09-11 17:40:07
回答 1查看 1.1K关注 0票数 1

$ npm -v 3.10.3

$ node -v v4.5.0

我试图从kadirahq/mup设置mup.js,但之后

cd .deploy

mup设置

我没有得到任何关于它是否正确设置的状态,只是返回下一行,而不是mupx setup,它在整个过程中提供了成功的MUPX setup消息。

谁能提供一个工作的mup.js,部署到自己的自我托管(没有数字海洋的例子等)的实际真实的例子,请像我已经这样做了。

一个工作的mup.js,它有真正的mongo_url,mongo_oplog,root_url,因为我已经尝试过了,但都没有成功。

编辑:

Mac OSX Meteor 1.4.1.1

新增mysparkapp/.deploy/mup.js示例:

代码语言:javascript
复制
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设置

代码语言:javascript
复制
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部署

代码语言:javascript
复制
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'

    -----------

然后

$ npm安装不变警告--保存

代码语言:javascript
复制
x Verifying Deployment: FAILED

-----------------------------------STDERR---------------------------- -------
erm"
npm ERR! node v4.4.7
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! meteor-dev-bundle@0.0.0 install: `node npm-rebuild.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the meteor-dev-bundle@0.0.0 install script 'node npm-rebuild.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the meteor-dev-bundle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node npm-rebuild.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meteor-dev-bundle
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls meteor-dev-bundle
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /bundle/bundle/programs/server/npm-debug.log

=> Redeploying previous version of the app

-----------------------------------STDOUT-----------------------------------

To see more logs type 'mup logs --tail=50'

----------------------------------------------------------------------------

但后来的错误:找不到模块'fbjs/lib/invariant‘再次出现?

解决方案(至少对我来说)

代码语言:javascript
复制
$npm install -g bcrypt-nodejs && 
$npm uninstall -g bcrypt 
EN

回答 1

Stack Overflow用户

发布于 2016-09-11 18:31:18

确保使用应用程序位置的完整路径- /users//..mup.js不喜欢~/

否则,请发布您的mup.js示例,我会让您知道哪里出了问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39434778

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档