Open Akiyam-hub opened 2 years ago
デプロイ先のFirebaseプロジェクトが存在しない、またはアクセス権限がなさそうですね。
ご自分のFirebaseアカウントで、Firebaseプロジェクトは作成されている..という認識でよろしいでしょうか? https://github.com/tadashi-aikawa/togowl#create-your-app-on-firebase
ご自分のFirebaseアカウントで、Firebaseプロジェクト
はい ここではakitogowlとして作成させていただきました.
その後.firebase.config.sample.json
を参考に.firebase.config.json
を作成しました.
projectId
など赤枠の部分は togowl
ではなく akitogowl
になっていますでしょうか?
はい.いずれもAkitogowlとなっております
ちなみにユーザー権限はオーナーとなっています
こちらのjsonの内容をそのまま使うだけで大丈夫なはずなのですが..。
近々、セキュリティ周りのパッチアップデートをする予定ですので、そのときにデプロイできるか試してみます。
@Akiyam-hub
.firebaserc
の設定値が原因な気がします..。ここを変えていただければいけそうかと。
$ cat .\.firebaserc
{
"projects": {
"default": "togowl"
}
}
このような記述でよろしいでしょうか
再設定後にfirebase のログアウト,キャッシュの削除をしてDeployを試みましたが'ERR'は変わりません.
追記 記入忘れていた '"databaseURL": "https://{akitogowlと記入}.appspot.com",' も入れましたがそちらでも変わりませんでした.
Error: Failed to get Firebase project togowl. Please make sure the project exists and your account has permission to access it.
↑と全く同じメッセージが表示されますか? (特に togowl のところです)
> togowl@2.28.0 deploy /Users/username/togowl
> firebase deploy
=== Deploying to 'akitogowl'...
i deploying firestore, hosting
i firestore: reading indexes from firestore.indexes.json...
i cloud.firestore: checking firestore.rules for compilation errors...
✔ cloud.firestore: rules file firestore.rules compiled successfully
Error: Specified "public" directory "dist" does not exist, can't deploy hosting to site "akitogowl"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! togowl@2.28.0 deploy: `firebase deploy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the togowl@2.28.0 deploy 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/username/.npm/_logs/2021-12-02T01_05_16_852Z-debug.log
こちらが現在のエラーです
成果物がないのでエラーになっています。 npm run build
をお願いします。
ご返信ありがとうございます. run buildなどはできましたがdeployはERRが続くので一度プロジェクトをクリーンにして再び試みてみます
firebase上でアプリを作成する際に注意しておきたい設定はあるでしょうか?
いえ、私が把握している限り他の手順は問題なさそうです。(作成が数年前なのでFirebaseの仕様が変わっている可能性はありそうですが...)
deployはERRが続く
こちらのエラーログを見てみないと分からないため、必要あれば共有いただければと思います。
以下を実行しました
.firebase.config.json
に構成を追加.firebaserc
のdefaultをakitogowlsに変更
$ npm install
$ npm install -g firebase-tools
$ firebase login
$ npx browserslist@latest --update-db // buildの時に推奨されたので
$ npm run build
$ npm run deploy
togowl@2.28.0 deploy /Users/~/togowl firebase deploy
Error: Failed to get Firebase project akitogolws. Please make sure the project exists and your account has permission to access it.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! togowl@2.28.0 deploy: firebase deploy
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the togowl@2.28.0 deploy 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/~/.npm/_logs/2021-12-05T02_43_56_405Z-debug.log
Error: Failed to get Firebase project akitogolws.
akitogowls
ではなく akitogolws
になってそうです。
akitogowlsを有効にし, Cloud API Managerを有効にしました
実行しましたがこちらのようになりました
=== Deploying to 'akitogowls'...
i deploying firestore, hosting
i firestore: reading indexes from firestore.indexes.json...
i cloud.firestore: checking firestore.rules for compilation errors...
✔ cloud.firestore: rules file firestore.rules compiled successfully
Error: HTTP Error: 404, Project 'akitogowls' does not exist.
Having trouble? Try firebase [command] --help
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! togowl@2.28.0 deploy: `firebase deploy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the togowl@2.28.0 deploy 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/~/.npm/_logs/2021-12-05T04_47_28_369Z-debug.log
以前は akitogowl
になっていましたが、Firebaseプロジェクトの名前も akitogowls
であっていますか?
https://github.com/tadashi-aikawa/togowl/issues/13#issuecomment-984196013
はい,その後再びプロジェクトを削除して
aktogowls
にして同じ手順を行なっていますが同じ状態です.
それであれば問題なさそうですね.. 🤔
※ aktogowls
となってますが akitogowls
のタイプミスということでよろしいですよね・・?
aktogowls となってますが akitogowls のタイプミスということでよろしいですよね・・?
あの後こちらの操作で
Firebase Cloud Firestoreを作成時に誤ってDatastoreをつかったことにより
This operation is not available for Cloud Firestore projects in Datastore mode
が出てしまったので再びプロジェクトを新規に作成して行いました.
今度は無事に
=== Deploying to 'aktogowls'...
i deploying firestore, hosting
i firestore: reading indexes from firestore.indexes.json...
i cloud.firestore: checking firestore.rules for compilation errors...
✔ cloud.firestore: rules file firestore.rules compiled successfully
i firestore: uploading rules firestore.rules...
✔ firestore: deployed indexes in firestore.indexes.json successfully
i hosting[aktogowls]: beginning deploy...
i hosting[aktogowls]: found 40 files in dist
✔ hosting[aktogowls]: file upload complete
✔ firestore: released rules firestore.rules to cloud.firestore
i hosting[aktogowls]: finalizing version...
✔ hosting[aktogowls]: version finalized
i hosting[aktogowls]: releasing new version...
✔ hosting[aktogowls]: release complete
✔ Deploy complete!
が表記し成功することができました.
こちら側の誤字や未設定な箇所が原因でした.
真摯に対応してくださったことに感謝いたします.🙇
正常にデプロイできたようで良かったです!
Togowlでログインするには、Firebaseからメールアドレスベースの認証情報を作成する必要があります。
また、その後にTodoistやToggl、Slackと通信するとき、CORSエラーに悩まされるかもしれません。私の場合はAWSのLightsailにnginxでproxyサーバーを立てることによって回避しています。設定が少し難しいので、もし必要でしたら仰ってください。
上記は面倒なので、とりあえず軽く試してから、使えそうならしっかり準備したい... という場合は、私が立てたProxyサーバーをそれまでの間、ご利用いただいても構いません。必要な場合は、TwitterのDMなどでURLをお伝えします。
ありがとうございます.
Togowlでログインするには、Firebaseからメールアドレスベースの認証情報を作成する必要があります。
これはAuthenticationでメールとパスワードを登録してからnpm run build
--->npm run test:e2e
をするということでよろしいでしょうか?
いえ、Authenticationでメールとパスワードを登録したら、その情報を使ってデプロイしたTogowlにてログインできます。
※ npm run test:e2e
はe2eテストのコマンドです
恐れ入ります. 登録後,試したところ undefined: Cannot read properties of undefined (reading 'name') と表記されました.
追記 失礼します.あれから何度か試してみたのですが解決しませんでした.
登録したはずのユーザー情報が認識されていないようでした
初めまして,今回開発してくださったこちらのツールに大変興味を抱かせていただきました.
そこで試しに利用しようと試みたのですがDeployをしても
npm ERR
により正常に使うことができません.使用環境
MacOS:BigSur 11.6 node:v14.18.2 npm: 6.14.15
行ったこと
npm
のインストールまで.firebase.config.json
の作成npm install -g firebase-tools
firebase login
npm run deploy
<---ここでエラー表示されるエラー
試したこと
キャッシュのクリア
結果:解決せず