Meteor 0.9 Modulus deployment doesn't work - “Cannot find module 'fibers'”

此生再无相见时 提交于 2019-11-28 23:22:52

This may have something to do with the new architecture of the meteor bundle (the process which converts a Meteor app to a regular Node.js app).

In Meteor < 0.9 you had to run npm install at the root of the bundle to get npm modules installed, now you have to cd in programs/server first, as stated in the README :

This is a Meteor application bundle. It has only one external dependency:
Node.js 0.10.29 or newer. To run the application:

  $ (cd programs/server && npm install)
  $ export MONGO_URL='mongodb://user:password@host:port/databasename'
  $ export ROOT_URL='http://example.com'
  $ export MAIL_URL='smtp://user:password@mailhost:port/'
  $ node main.js

Use the PORT environment variable to set the port where the
application will listen. The default is 80, but that will require
root on most systems.

Find out more about Meteor at meteor.com.

Modulus developed a tool called demeteorizer which is supposed to automate this process of converting a Meteor app to a Node.js app, and it's possible that they have not yet modified the tool to account for 0.9 changes.

After building your bundle, run the following:

cd <bundle dir>/programs/server
sudo npm install

That will install fibers into the bundle and that fixed it for me. Hope this works for you!

I had the same issue but with building from the Meteorite Heroku buildpack. To save you the frustration of finding an updated buildpack, if you go here, you can use this buildpack that has the updates for Meteor 0.9.x. Thanks @djhi.

Can't tell if this is the same problem, however my app is now running after removing the 'spiderable' package.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!