Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a production meteor server in 2015?

Meteor has changed, and is missing a production deployment in docs.meteor.com.

I have a pretty nice working meteor app in dev mode. So I bundle it with the new command since bundle has been deprecated:

meteor build ./build/ --architecture os.linux.x86_64

On the production server, I install the latest version of nodejs (currently 0.12), copy and decompress the build. The Mongo DB is on an other server, so I just redefine PORT, ROOT_URL, MONGO_OPLOG_URL and MONGO_URL environment variables.

But quickly end-up with the too frequently seen fibers missing error:

module.js:338
    throw err;
          ^
Error: Cannot find module 'fibers'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    ...........

So, here is what I tried:

  • npm install [email protected] -g # but it fails.
  • npm install fibers -g succeeds and installs the version 1.0.5

Here is the situation:

root@server:~# npm version
{ npm: '2.5.1',
  http_parser: '2.3',
  modules: '14',
  node: '0.12.0',
  openssl: '1.0.1l',
  uv: '1.0.2',
  v8: '3.28.73',
  zlib: '1.2.8' }
root@server:~# npm ls -g | grep fibers
├── [email protected]
root@server:/opt/meteor/authmonitor-src# meteor list-platforms
browser                                       
server

But I still have the same : Error: Cannot find module 'fibers'

Questions:

  • Is there an up to date manual on how to deploy meteor applications on local production server?
  • Why / how should I install fibers module, and which version?
  • export NODE_PATH=/usr/local/lib/node_modules/ partly helped, but after installing with npm install xxx -g the required modules such as underscore and semver, it ends with an other fiber error: "Error: Module did not self-register."
  • What would you recommend?

Thanks,

like image 945
Pivert Avatar asked Oct 20 '22 17:10

Pivert


1 Answers

I would use Meteor Up which automates lots of things. Here is a video tutorial from Sacha

like image 54
Meteorpoly Avatar answered Nov 15 '22 05:11

Meteorpoly