daikw / spajam-2019B

MIT License
0 stars 0 forks source link

firebaseでauth #1

Open daikw opened 5 years ago

daikw commented 5 years ago

参考: Ionic 4とFirebaseでチャットアプリ - Qiita

環境変数: dotenv Nodeプロジェクトで環境依存の設定の管理方法 - Qiita

daikw commented 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

daikw commented 5 years ago

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
daikw commented 5 years ago

authはこれ https://github.com/firebase/firebaseui-web

document: https://firebase.google.com/docs/auth/web/firebaseui?hl=ja