title: Kadira/mup.js Error: Cannot find module 'fbjs/lib/invariant'
body: <p>$ npm -v
  3.10.3</p>
  
  <p>$ node -v
  v4.5.0</p>
  
  <p>I tried to setup mup.js from kadirahq/mup but after</p>
  
  <p>cd .deploy</p>
  
  <p>mup setup</p>
  
  <p>I don't get any status of whether it setup properly or not, just returns next line as opposed to mupx setup which did provide SUCCESS MUPX setup messages along the way.</p>
  
  <p>Can anyone provide actual real example of a working mup.js that is deployed to their own self hosting (no digital ocean examples etc) please as I already did that.</p>
  
  <p>a working mup.js that has real mongo_url, mongo_oplog, root_url because I have tried but none successful yet.</p>
  
  <p>EDIT:</p>
  
  <p>Mac OSX
  Meteor 1.4.1.1</p>
  
  <p>Added example of mysparkapp/.deploy/mup.js:</p>
  
  <pre><code>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: {},
      },
    },
  };
  </code></pre>
  
  <p>then</p>
  
  <p>$ mup setup</p>
  
  <pre><code>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
  </code></pre>
  
  <p>$ mup deploy</p>
  
  <pre><code>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.
      =&gt; 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.&lt;anonymous&gt; (/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)
  
      =&gt; Redeploying previous version of the app
  
      -----------------------------------STDOUT-----------------------------------
  
      To see more logs type 'mup logs --tail=50'
  
      -----------
  </code></pre>
  
  <p>Then </p>
  
  <p>$ npm install invariant warning --save</p>
  
  <pre><code>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
  
  =&gt; Redeploying previous version of the app
  
  -----------------------------------STDOUT-----------------------------------
  
  To see more logs type 'mup logs --tail=50'
  
  ----------------------------------------------------------------------------
  </code></pre>
  
  <p>But later  Error: Cannot find module 'fbjs/lib/invariant' reappears again???</p>
  
  <p>SOLUTION (for me anyway)</p>
  
  <pre><code>$npm install -g bcrypt-nodejs &amp;&amp; 
  $npm uninstall -g bcrypt 
  </code></pre>