【问题标题】:why does running a Meteor app break ability to run other Meter app?为什么运行 Meteor 应用程序会破坏运行其他 Meter 应用程序的能力?
【发布时间】:2015-12-08 19:13:30
【问题描述】:

我正在开发一个运行良好的流星应用程序(METEOR@1.2.1)......但是我目睹了几集,在执行一个不同的流星应用程序之后,它碰巧像下面这样失败,之后当我尝试运行我自己的应用程序,它在启动时突然开始失败:

其他应用:

git clone https://github.com/RocketChat/Rocket.Chat
cd Rocket.Chat


meteor
[[[[[ ~/other_src/Rocket.Chat ]]]]]           

=> Started proxy.                             
=> Started MongoDB.                           
rocketchat:file: updating npm dependencies -- mkdirp, gridfs-stream, gm...
rocketchat:assets: updating npm dependencies -- image-size...
rocketchat:ldap: updating npm dependencies -- ldapjs...
rocketchat:theme: updating npm dependencies -- less, less-plugin-autoprefix...
rocketchat:tutum: updating npm dependencies -- redis...
rocketchat:ui-sidenav: updating npm dependencies -- less, less-plugin-autoprefix...
steffo:meteor-accounts-saml: updating npm dependencies -- xml2js, xml-crypto, xmldom, connect, xmlbuilder, querystring, xml-encryption...
W20151207-17:15:31.344(-5)? (STDERR)          
W20151207-17:15:31.345(-5)? (STDERR) module.js:340
W20151207-17:15:31.346(-5)? (STDERR)     throw err;
W20151207-17:15:31.346(-5)? (STDERR)           ^
W20151207-17:15:31.346(-5)? (STDERR) Error: Cannot find module 'fibers'
W20151207-17:15:31.346(-5)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20151207-17:15:31.348(-5)? (STDERR)     at Function.Module._load (module.js:280:25)
W20151207-17:15:31.348(-5)? (STDERR)     at Module.require (module.js:364:17)
W20151207-17:15:31.348(-5)? (STDERR)     at require (module.js:380:17)
W20151207-17:15:31.349(-5)? (STDERR)     at Object.<anonymous> (/home/scott/other_src/Rocket.Chat/.meteor/local/build/programs/server/boot.js:1:75)
W20151207-17:15:31.349(-5)? (STDERR)     at Module._compile (module.js:456:26)
W20151207-17:15:31.349(-5)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
W20151207-17:15:31.349(-5)? (STDERR)     at Module.load (module.js:356:32)
W20151207-17:15:31.349(-5)? (STDERR)     at Function.Module._load (module.js:312:12)
W20151207-17:15:31.349(-5)? (STDERR)     at Module.require (module.js:364:17)

这是我的应用程序...这些错误仅在运行以上应用程序后才开始发生

meteor 
[[[[[ ~/other_src/github/myapp ]]]]]      

=> Started proxy.                             
=> Started MongoDB.                           
W20151207-17:37:03.985(-5)? (STDERR)          
W20151207-17:37:03.987(-5)? (STDERR) module.js:340
W20151207-17:37:03.987(-5)? (STDERR)     throw err;
W20151207-17:37:03.987(-5)? (STDERR)           ^
W20151207-17:37:03.987(-5)? (STDERR) Error: Cannot find module 'fibers'
W20151207-17:37:03.987(-5)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20151207-17:37:03.987(-5)? (STDERR)     at Function.Module._load (module.js:280:25)
W20151207-17:37:03.988(-5)? (STDERR)     at Module.require (module.js:364:17)
W20151207-17:37:03.988(-5)? (STDERR)     at require (module.js:380:17)
W20151207-17:37:03.988(-5)? (STDERR)     at Object.<anonymous> (/home/scott/other_src/github/myapp/.meteor/local/build/programs/server/boot.js:1:75)
W20151207-17:37:03.988(-5)? (STDERR)     at Module._compile (module.js:456:26)
W20151207-17:37:03.988(-5)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
W20151207-17:37:03.988(-5)? (STDERR)     at Module.load (module.js:356:32)
W20151207-17:37:03.989(-5)? (STDERR)     at Function.Module._load (module.js:312:12)
W20151207-17:37:03.989(-5)? (STDERR)     at Module.require (module.js:364:17)

我知道如果我删除我的 ~/.meteor 目录并重新安装流星

curl https://install.meteor.com/ | sh

我自己以前工作的应用突然又开始正常工作了。

ubuntu 15.10

我没有使用特殊权限

无论我是否安装了 nodejs (node-v5.1.0),我都会遇到同样的问题(meteor 不依赖外部 nodejs 安装)

这是流星中的已知错误吗?
这种流星行为是故意的吗? 关于如何避免这种情况的任何建议?

【问题讨论】:

  • 几个问题:您使用什么操作系统来运行应用程序?上面只是用 sh 安装 Meteor,你是否设置了其他任何东西(权限等)?你使用什么版本的节点?也许this question 会有所帮助。
  • 你能转储 npm 版本的结果吗?当你运行meteor时,它使用node js v 0.40,但下次可能不是这样......请记住Meteor不支持最新的Node版本:github.com/meteor/meteor/issues/5452

标签: meteor build crash


【解决方案1】:

当您运行其中一个时,它正在更新包,如您的第一个代码示例“更新依赖项”中所示。

Meteor 使用您的 .meteor 文件夹在您的机器中全局存储包。我会说您的 Fiber 包的版本或您的操作系统版本可能存在问题。

【讨论】:

    【解决方案2】:

    如果您使用默认设置运行 Meteor 应用程序,它将在端口 3000 上运行。在同一端口上运行多个不同的 Meteor 应用程序可能会导致上述问题。要让应用在不同的端口上运行,请尝试使用--port 参数,例如

    $ meteor run --port 4000
    

    【讨论】:

    • 他连续运行它们,而不是同时运行
    • 谢谢,但当一次只运行一个应用程序时会出现此问题
    • 哦,我明白了!那我的回答解决不了问题。我会在原贴下问一些问题,也许我们可以一起发现一些有用的东西。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-19
    • 1970-01-01
    • 2012-05-03
    • 1970-01-01
    • 2014-10-12
    • 1970-01-01
    相关资源
    最近更新 更多