這篇算是memo吧
1. 要先開一個firebase的emulator掛著,否則localhost不能讀寫realtime database
firebase emulators:start
2. firebase function要錢,也不知道功能是什麼,在firebase init時不要選它即可
3. firebase auth by phone一天50則免費
https://firebase.google.com/docs/auth/web/phone-auth?authuser=0
4. kill port的方式
用netstat -ano查找某個port被哪個PID佔用
用taskkill /f /im [PID]砍掉該PID
5. npm install -g firebase-tools
6. Firebase phone auth
https://www.youtube.com/watch?v=5jYIIwm6IeI
7. Error: Server Error. unable to get local issuer certificate
在command裡輸入set NODE_TLS_REJECT_UNAUTHORIZED=0即可workaround
ref: https://blog.darkthread.net/blog/npm-unable-get-local-issuer-cert-issue/
8. 發生以下error時,到根目錄下砍掉functions資料夾即可,反正用不到firebase functions
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
+ functions: required API cloudfunctions.googleapis.com is enabled
! functions: missing required API cloudbuild.googleapis.com. Enabling now...
Error: Your project fire-outdoor must be on the Blaze (pay-as-you-go) plan to complete this command. Required API cloudbuild.googleapis.com can't be enabled until the upgrade is complete. To upgrade, visit the following URL:
沒有留言:
張貼留言