15

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

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)

我所做的是:

但即使在尝试解决“更新后无法安装、更新或运行 Meteor”问题后,我也无法让它运行。

有人猜猜这里有什么问题吗?

4

4 回答 4

13

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

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

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

于 2014-09-02T00:55:13.063 回答
12

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

在 Meteor < 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 的更改。

于 2014-08-30T13:32:19.280 回答
1

我遇到了同样的问题,但是从 Meteorite Heroku buildpack 构建。为了避免您在查找更新的 buildpack 时遇到麻烦,如果您去这里,您可以使用这个包含 Meteor 0.9.x 更新的 buildpack。谢谢@djhi。

于 2014-09-15T23:57:20.270 回答
0

无法判断这是否是同一个问题,但是我的应用程序在删除“可蜘蛛”包后现在正在运行。

于 2014-08-30T13:22:24.313 回答