5

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 fibers@1.0.1 -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
├── fibers@1.0.5
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,

Pivert
  • 755
  • 5
  • 17

2 Answers2

2

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

Meteorpoly
  • 938
  • 7
  • 6
1

Is there an up to date manual on how to deploy meteor applications on local production server?

No, there is no official documentation. The community is waiting for MDG to release galaxy, which will be a paid hosting service for meteor.

Why / how should I install fibers module, and which version?

Based on what you wrote, there are a couple of things I see that could be problems:

After you untar the bundle you need to:

$ cd bundle/programs/server && npm install

You should not need to install any node modules globally in order for your app to work.

It's also recommended that you run the version of node appropriate for your meteor version. Have a look at the changelog and search for 'node'. At the time of this writing, the recommended version is 0.10.33.

hosting

If you are hosting somewhere fairly bare-bones like DigitalOcean or EC2, I'd recommend using Meteor Up for your deploys. If you prefer to do the sysadmin tasks yourself, I suggesting reading my related answers here and here.

Another popular hosting choice is modulus, becuase it's more full-service. You can read some tutorials here and here.

David Weldon
  • 63,632
  • 11
  • 148
  • 146
  • just tried v0.12.x and fails.. iojs fails for fibers. changed to v0.10.36 (as suggested ..see history.md at github.) works fine. wonder why the dependancy is not upgraded to latest? lots of other programs running on similar may need node to be upgraded. – mirageglobe Apr 19 '15 at 18:53
  • There is actually _some_ official documentation on it. See http://docs.meteor.com/#/full/meteorbuild and also `meteor help build`. – Bart Louwers Dec 22 '15 at 22:55