Open daikw opened 5 years ago
'npm install --save firebase' とするとgrpcのインストールで失敗する。
下記のチケットで議論されている。 https://github.com/grpc/grpc-node/issues/834
特定のバージョンをインストールして、resolutionに追記しても動かない。
npm install grpc@1.20.2
"resolutions": {
"grpc": "1.20.2"
}
https://github.com/firebase/firebase-js-sdk/issues/1738#issuecomment-488814477 https://github.com/yarnpkg/rfcs/blob/master/implemented/0000-selective-versions-resolutions.md
あしたには直るらしい? https://github.com/firebase/firebase-js-sdk/issues/1738#issuecomment-488936229
v12.x.x
だと動かないっぽいので、nodeのバージョンを下げる。
一旦11.15.0
で試す。
nodebrew use v11.15.0
npm rebuild
npm install --save firebase
--> 成功
現在のionic info:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.2
System:
NodeJS : v11.15.0 (/Users/daik_/.nodebrew/node/v11.15.0/bin/node)
npm : 6.7.0
OS : macOS Mojave
参考: Ionic 4とFirebaseでチャットアプリ - Qiita
環境変数: dotenv Nodeプロジェクトで環境依存の設定の管理方法 - Qiita