There are already a few questions around here related to this question.
I want to deploy a meteorjs app to the official meteor servers. My application uses fibers, and since fibers is compiled for my system ( Mac OSX ) it creates an error on the ubuntu servers by meteor.
The other questions/answers are related to deploying the app somewhere else than the official meteor servers or they seem to leave a step out, since they don't work for me.
A few of the related posts are these:
Reinstalling node-fibers for a Meteor app on Modulus.io?
Problems with Meteor deployment related to fibers module
I would like to use:
meteor deploy myapp.meteor.com
EDIT:
My question above was not complete unfortunately, I use Future, which is part of fibers. When I deploy it to meteor and access the server logs, I get these WARNINGs and the applications crashes right after.
WARNING /meteor/dev_bundles/0.3.13/lib/node_modules/fibers/future.js:173
WARNING Error: Cannot find module 'fibers/Future'
In my code I have the line:
Future = Npm.require("fibers/future");
Is this not possible on meteor deploy XXX.meteor.com ?
EDIT 2nd: Instead of using:
Future = Npm.require("fibers/future");
I also tried:
var path = Npm.require('path');
var fs = Npm.require('fs');
var base = path.resolve('.');
var isBundle = fs.existsSync(base + '/bundle');
var modulePath = base + (isBundle ? '/bundle/static' : '/public') + '/node_modules';
Future = Npm.require(modulePath + '/fibers/future');
As suggested in this post:
How can I deploy node modules in a Meteor app on meteor.com?
And installed fibers to:
.meteor/local/build/programs/server/public/node_modules/
But with this I get either this when running meteor without sudo Error: EACCES, permission denied 'XXXX/.meteor/local/build' at Object.fs.renameSync (fs.js:439:18)
Or this error, when running it with sudo: Error: Cannot find module 'XXXX/.meteor/local/build/programs/server/public/node_modules/fibers/future'
Usually I run meteor without sudo ofc!