Running built of the Meteor's sample app via "node main.js"

I want to run the most basic Meteor app via Node. I make the following, orderly;

  1. mkdir src && cd src
  2. meteor create sample_app
  3. npm install --production
  4. meteor build … --allow-superuser --directory
  5. cd …/bundle
  6. node --version

v4.6.1

  1. node main.js

But, it throws the following error;
module.js:327
throw err;
^

Error: Cannot find module 'fibers’
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. (/Users/gokhanmb/workspace/meteor_1_5/aws/sample_app/bundle/programs/server/boot.js:1:75)
at Module._compile (module.js:409:26)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)

Why cannot I run the most basic Node app via those simple steps?
Thank you!

Hi, try this:

5. cd .../bundle/programs/server && npm install
6. cd .../bundle
7. export ROOT_URL=http://localhost
8. export PORT=3000
9. node main.js

or : https://scotch.io/tutorials/building-a-slack-clone-in-meteor-js-part-5-deployment

3 Likes

Hi Cong,
I was trying to deploy the sample to AWS Elastic Beanstalk. It seems these steps work at my local setup. I will try them at my AWS Elastic Beanstalk setup as well. Thank you.