Selah-UM / chatAndNote

This is a chat app. You can also make notes.
1 stars 0 forks source link

firebase設定 #20

Closed Selah-UM closed 1 year ago

Selah-UM commented 2 years ago

hostingはしないでdatabaseだけ使いたい。

Selah-UM commented 2 years ago

プロジェクト作成は終わった webアプリ登録しないと。

Selah-UM commented 2 years ago

N予備21必見!

Selah-UM commented 2 years ago

webpack 追加して設定した。 indexはいいんだけど、roomの方はどうしたらいいんだろう?

Selah-UM commented 2 years ago

なんかめっちゃいっぱいエラー来た。 そこの解決から

軽く調べた感じ、expressのセキュリティにdatabaseURLがはじかれてるっぽい?

Selah-UM commented 2 years ago

firebase-admin追加してみたけど、それをjsファイルに読み込めん…なぜ?

Selah-UM commented 2 years ago

この記事参考になりそう

Selah-UM commented 1 year ago

`asset room.bundle.js 10.1 MiB [emitted] (name: room) asset index.bundle.js 108 bytes [compared for emit] (name: index) runtime modules 1.04 KiB 5 modules javascript modules 9.35 MiB modules by path ../node_modules/ 9.35 MiB 693 modules modules by path ./*.js 1 KiB ./index.js 24 bytes [built] [code generated] ./room.js 1000 bytes [built] [code generated]

WARNING in ../node_modules/retry-request/index.js 76:21-39 Module not found: Error: Can't resolve 'request' in '/app/node_modules/retry-request' @ ../node_modules/@google-cloud/storage/build/src/nodejs-common/util.js 26:21-45 @ ../node_modules/@google-cloud/storage/build/src/nodejs-common/index.js 8:13-30 @ ../node_modules/@google-cloud/storage/build/src/bucket.js 17:24-50 @ ../node_modules/@google-cloud/storage/build/src/index.js 31:15-34 @ ../node_modules/firebase-admin/lib/storage/storage.js 55:22-62 @ ../node_modules/firebase-admin/lib/app/firebase-namespace.js 127:24-61 @ ../node_modules/firebase-admin/lib/default-namespace.js 19:29-64 @ ../node_modules/firebase-admin/lib/index.js 19:17-47 @ ./room.js 8:0-39 10:0-19 11:14-35 26:9-23

1 warning has detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.69.1 compiled with 1 warning in 6126 ms root@b40eca891df3:/app# Module not found: Error: Can't resolve 'request' in '/app/node_modules/retry-request' `

Selah-UM commented 1 year ago

Module not found: Error: Package path . is not exported from package

Selah-UM commented 1 year ago

Uncaught ReferenceError: firebase is not defined

Selah-UM commented 1 year ago

とりあえず、firebaseの設定はできた 次はdbの設定がうまくいかん…