LoginSignup
5
2

More than 5 years have passed since last update.

firebaseローカルサーバ起動時にfunctions: Cannot start emulator. Error: Cannot find module '@google-cloud/functions-emulator/src/config'と返された。

Posted at

https://github.com/firebase/firebase-tools/issues/552
上記Githubのissueで報告されている事象が起き、
そしてそこで書かれている対策を実際に試して解消できたのでメモ書きとして残しておきます。


ターミナル
yarn global add firebase-tools

でfirebase-toolsをいれてある状態です。

ターミナル
firebase serve --only functions,hosting

を実行したところ

ターミナル
functions: Cannot start emulator. Error: Cannot find module '@google-cloud/functions-emulator/src/config'

と返された。
emulatorが見つからないらしい。

調べていく中で冒頭のissueをみつけ、
以下のコマンドを実行。

ターミナル
yarn global add @google-cloud/functions-emulator --ignore-engines

無事firebase serve --only functions,hostingが実行できました。

 最後に

初心者&独学なので間違いなどあるかもしれません。
他にも方法がありましたら、コメントに残していただけると幸いです。

5
2
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
5
2