記事執筆時点で安定版のfirebase 6.2.4をインストールを試みたところ以下のエラーが出ました。
$ npm install --save firebase@6.2.6
:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.20.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.20.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yokoyamaryouta/.npm/_logs/2020-05-10T05_49_16_325Z-debug.log
結論
安定版で実行したらインストールできました。以下から確認&試してみて下さい。
$ node -v
v14.8.0 //筆者の場合
こちら から確認&インストールできます。
安定版インストール後に再度実行したらいけました。
$ node -v
v12.18.3 //執筆時
$ npm install --save firebase@6.2.6