LoginSignup
0
0

More than 5 years have passed since last update.

Meteor で Cannot find module 'fibers' と怒られた時の対処

Last updated at Posted at 2018-05-26

注意: この記事は 2018.5.27 時点での latest stable = Meteor 1.6.1.1 向けに書かれています。Meteor 1.6.1.2 および 1.7系では役にたたないかもしれません。

2018.8.15 追記: この記事の内容は Meteor 1.6.1.2 以降では役に立ちません。

症状

Windows で Meteor (1.6.1.1) を使っていると、Development server が突如として起動しなくなります。

こんなかんじ。

W20180527-07:08:33.559(9)? (STDERR) module.js:549
W20180527-07:08:34.405(9)? (STDERR)     throw err;
W20180527-07:08:34.419(9)? (STDERR)     ^
W20180527-07:08:34.420(9)? (STDERR)
W20180527-07:08:34.422(9)? (STDERR) Error: Cannot find module 'fibers'
W20180527-07:08:34.422(9)? (STDERR)     at Function.Module._resolveFilename (module.js:547:15)
W20180527-07:08:34.423(9)? (STDERR)     at Function.Module._load (module.js:474:25)
W20180527-07:08:34.424(9)? (STDERR)     at Module.require (module.js:596:17)
W20180527-07:08:34.425(9)? (STDERR)     at require (internal/module.js:11:18)
W20180527-07:08:34.426(9)? (STDERR)     at Object.<anonymous> (C:\Users\masayuki\Documents\project\fgw\.meteor\local\build\programs\server\boot.js:1:75)
W20180527-07:08:34.427(9)? (STDERR)     at Module._compile (module.js:652:30)
W20180527-07:08:34.428(9)? (STDERR)     at Object.Module._extensions..js (module.js:663:10)
W20180527-07:08:34.429(9)? (STDERR)     at Module.load (module.js:565:32)
W20180527-07:08:34.430(9)? (STDERR)     at tryModuleLoad (module.js:505:12)
W20180527-07:08:34.431(9)? (STDERR)     at Function.Module._load (module.js:497:3)

fibersモジュールがないんだから、と npmmeteor npm でインストールしようとしても、うまくいきません。

というのも、Windows では シンボリックリンクがうまく動かないからです。

解決

無理くり fibers をインストールしてごにょごにょしてたのですが、次の RC で解消したらしいのでおとなしくアップデートしましょう。

$ meteor update --release 1.6.1.2-rc.0

1.7系の RC にアップデートしてもいいようです。
ちなみに、安定版では依存関係を手動で解消するしかありません。
枯れていない技術だからと割り切るしかなさそうです。Meteor らしい。

サーバー側でエラーは出なくなったけれどクライアントで読み込めないなら、
依存パッケージのアップデートを試してみましょう。

meteor update
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0