0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

firebase-tools の update 後に --version で TypeEerror

0
Posted at

環境

firebase CLI

$ firebase --version
8.18.1

なにをしたのか

Firebase の Firestore のルール検証を行うために、Local Emulator Suite をインストール。その後、Terminal に以下のメッセージが表示されたので、「新しいバージョンでたのかー」程度の認識で、興味本位で実行。

   ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                                                     │
   │                                          Update available 8.18.1 → 9.12.0                                           │
   │                    To update to the latest version using npm, run npm install -g firebase-tools                     │
   │   For other CLI management options, visit the CLI documentation (https://firebase.google.com/docs/cli#update-cli)   │                                                                                                                     │
   │                                                                                                                     │
   │                                                                                                                     │
   ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
$ npm install -g firebase-tools

どうなったか

インストールできたか確認すると、TypeError が表示され、バージョンすら表示されず。

$ firebase --version
***\nvm\v15.3.0\node_modules\firebase-tools\node_modules\@google-cloud\pubsub\build\src\pull-retry.js:24
    google_gax_1.grpc.status.DEADLINE_EXCEEDED,
                      ^

TypeError: Cannot read property 'status' of undefined
    at Object.<anonymous> (***\nvm\v15.3.0\node_modules\firebase-tools\node_modules\@google-cloud\pubsub\build\src\pull-retry.js:24:23)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Module.require (node:internal/modules/cjs/loader:991:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (***\nvm\v15.3.0\node_modules\firebase-tools\node_modules\@google-cloud\pubsub\build\src\message-stream.js:23:22)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Module.require (node:internal/modules/cjs/loader:991:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (***\nvm\v15.3.0\node_modules\firebase-tools\node_modules\@google-cloud\pubsub\build\src\subscriber.js:28:26)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)

※一部マスキングしてます(***)

どうしたか

firebase-tools の バージョンをダウングレード。

$ npm install -g firebase-tools@^8.18.1

$ firebase --version
8.20.0

結論

よく分かってないのに、脳死でコマンド run はダメ絶対

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?