Meteor 0.9模数部署;t工作-“;找不到模块'纤维'&”;

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

本文关键字:找不到 模块 纤维 工作 部署 Meteor      更新时间:2023-09-26

当尝试部署新创建的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"这个问题的解决方案后,我也无法让它运行。

有人猜到这里出了什么问题吗?

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

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

这将把纤维安装到束中,并为我固定。希望这对你有用!

这可能与meteor捆绑包的新架构有关(将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的变化。

我遇到了同样的问题,但使用Meteorite Heroku构建包进行构建。为了避免你在寻找更新的构建包时感到沮丧,如果你去这里,你可以使用这个更新了Meteor 0.9.x的构建包。谢谢@djhi。

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