流星0.9模数部署不起作用 - "找不到模块'光纤""

时间:2014-08-30 10:16:56

标签: javascript meteor modulus.io

当尝试部署新创建的Meteor(0.9)应用程序时,我总是在模数日志中收到此错误消息:

module.js:340
throw err;
      ^
Error: Cannot find module 'fibers'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/mnt/data/2/programs/server/boot.js:1:75)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

我做的是:

  • 使用these步骤
  • 安装meteor
  • 执行模数设置的these步骤

但即使在尝试问题"Can't install, update or run Meteor after update"的解决方案后,我也无法让它运行。

谁知道这里有什么问题?

4 个答案:

答案 0 :(得分:12)

这可能与流星束的新架构(将Meteor应用程序转换为常规Node.js应用程序的过程)有关。

在流星中&lt; 0.9你必须在捆绑包的根目录下运行npm install来安装npm模块,现在你必须首先在程序/服务器中进行cd,如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开发了一个名为demeteorizer的工具,它可以自动完成将Meteor应用程序转换为Node.js应用程序的过程,并且他们可能还没有修改该工具来解释0.9的变化。 / p>

答案 1 :(得分:12)

构建捆绑包后,运行以下命令:

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

那将光纤安装到光纤束中并为我修复它。希望这对你有用!

答案 2 :(得分:1)

我有同样的问题但是从Meteorite Heroku buildpack建造。为了省去查找更新的buildpack的麻烦,如果你去here,你可以使用这个包含Meteor 0.9.x更新的buildpack。谢谢@djhi。

答案 3 :(得分:0)

无法判断这是否是同一个问题,但是我的应用现在在删除'spiderable'包之后正在运行。