firebase-tools:Error: Not in a Firebase app directory (could not locate firebase.json)
事象
firebase deploy コマンド実行時に以下のエラーが発生
./firebase-deploy/node_modules/.bin/firebase deploy --token=$FIREBASE_DEPLOY_TOKEN -P default
Error: Not in a Firebase app directory (could not locate firebase.json)
原因
- .firebaserc
- firebase.json
がカレントディレクトリに存在しないため
対策
- .firebaserc
- firebase.json
をカレントディレクトリに追加する
.firebaserc 設定例
{
"projects": {
"default": "integrated-oath-xxx"
}
}
firebase.json 設定例
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}