Deploy the meteor to the official fibers of the meteorite servers

There are several questions related to this issue.

I want to deploy meteorjs application on official meteorite servers. My application uses fibers, and since the fibers were compiled for my system (Mac OSX), this creates an error on the ubuntu meteor servers.

Other questions / answers are related to deploying the application somewhere else than the official meteorite servers, or they seem to leave the step as they do not work for me.

Several related posts:

Reinstall node files for Meteor application on Modulus.io?

Meteor Fiber Deployment Issues

I would like to use:

meteor deploy myapp.meteor.com 

EDIT:

My question above was not complete, unfortunately, I use the future, which is part of the fibers. When I deploy it to a meteor and gain access to the server logs, I get these WARNINGS and the application crashes right after.

WARNING / meteor / dev_bundles / 0.3.13 / lib / node_modules / fibers / future.js: 173

WARNING Error: Cannot find module 'fiber / Future'

In my code, I have a line:

 Future = Npm.require("fibers/future"); 

Is it not possible to deploy XXX.meteor.com meteors?

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 to deploy node modules in a Meteor app on meteor.com?

And installed fibers for:

.meteor / local / assemblies / programs / server / open / node_modules /

But with this I get either this when starting a meteor without sudo Error: EACCES, permission denied "XXXX / .meteor / local / build" in Object.fs.renameSync (fs.js: 439: 18)

Or this error when starting from sudo: Error: cannot find module "XXXX / .meteor / local / build / programs / server / public / node_modules / fiber / future"

Usually I launch a meteor without sudo ofc!

+1
source share
3 answers

My problem was that I included the npm package to load another framework that split the new Npm into a meteorite.

+1
source

You just need to remove the fibers and reinstall them on your server, as indicated in the docs:

 cd bundle/programs/server/node_modules rm -r fibers npm install fibers@1.0.1 

In cases where the package directory is an unstretched version of a related application created using meteor bundle xxx.tar.gz on your ubuntu server

0
source

from the meteorite documentation it is clear that you can deploy to meteor.com using aneteor deployment or on your own server by creating a bundle with a bundle from the air.

Only when you create your kit that you need to install 'fibers'. If you are using a teetor-style spread, then no.

The part in which you need to remove and reinstall the fiber package is only required if you want to deploy like this

  • create a package on your development machine.
  • copy the bundle.tgz file to your server that runs another OS
  • unzip the bundle.tgz file and run the application

When creating the package, you need to install the fibers anyway. If you do all this on the server, follow these steps:

  • meteor packet - release 0.6.5.1 / my / output.tgz
  • tar -xvzf / my / output.tgz
  • mv bundle your-app-name
  • cd your-app-name / programs / server
  • npm install fiber
  • forever run your-app-name / main.js

these steps assume that you are using the node forever package

0
source

Source: https://habr.com/ru/post/957614/


All Articles