0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Firebase CLI v15 + Nuxt v3.17.3でFirebase Hostingにデプロイできなくなった

Last updated at Posted at 2025-12-11

結論

  • PRESET=Firebaseは非推奨になった
  • Firebase App Hostingを利用しましょう

事象

  • 12/11 突然デプロイできなくなった
  • Firebase CLIの途中で死んでいた。firebase ... --debug ってoptionを付与すると、内訳確認できるのでこれをで再度実行してみると原因がわかった → Nuxtのサーバサイド .server/output のビルド?で失敗してた
2025-12-11T08:39:50.5078685Z [2025-12-11T08:39:50.505Z] Building nodejs source
2025-12-11T08:39:50.5084132Z i  functions: Loading and analyzing source code for codebase nuxt-server to determine what to deploy 
2025-12-11T08:39:50.5085484Z [2025-12-11T08:39:50.505Z] Could not parse firebase-functions version '' into semver.
2025-12-11T08:39:50.5086556Z [2025-12-11T08:39:50.506Z] Could not find functions.yaml. Must use http discovery
2025-12-11T08:39:50.5109435Z [2025-12-11T08:39:50.510Z] Error: Cannot find module '/home/runner/work/repository/repository/.output/server/node_modules/firebase-functions/lib/v2/index.js'
2025-12-11T08:39:50.5112116Z     at createEsmNotFoundErr (node:internal/modules/cjs/loader:1244:15)
2025-12-11T08:39:50.5113025Z     at finalizeEsmResolution (node:internal/modules/cjs/loader:1232:15)
2025-12-11T08:39:50.5113511Z     at resolveExports (node:internal/modules/cjs/loader:638:14)
2025-12-11T08:39:50.5113961Z     at Module._findPath (node:internal/modules/cjs/loader:711:31)
2025-12-11T08:39:50.5114411Z     at Module._resolveFilename (node:internal/modules/cjs/loader:1193:27)
2025-12-11T08:39:50.5114854Z     at Function.resolve (node:internal/modules/helpers:193:19)
2025-12-11T08:39:50.5115639Z     at Delegate.findFunctionsBinary (/home/runner/.config/yarn/global/node_modules/firebase-tools/lib/deploy/functions/runtimes/node/index.js:101:33)
2025-12-11T08:39:50.5116723Z     at Delegate.spawnFunctionsProcess (/home/runner/.config/yarn/global/node_modules/firebase-tools/lib/deploy/functions/runtimes/node/index.js:125:30)
2025-12-11T08:39:50.5118069Z     at Delegate.serveAdmin (/home/runner/.config/yarn/global/node_modules/firebase-tools/lib/deploy/functions/runtimes/node/index.js:143:35)
2025-12-11T08:39:50.5119057Z     at Delegate.discoverBuild (/home/runner/.config/yarn/global/node_modules/firebase-tools/lib/deploy/functions/runtimes/node/index.js:183:41)
2025-12-11T08:39:50.5119560Z 
  • 調べたらFirebase CLIがv15にバージョンアップしてた。これが起因でデプロイできなくなってた

12/11 19時ごろ(日本時間)
image.png

ちなみにこうするとうまくいく(絶対組まないけど)

# Nuxt Build後
$ cd .output/server
$ npm install --omit=dev

Nitroのドキュメント見に行く

Nuxtは内部でNitroを採用しており、Nitroがいろんなデプロイ先に向けてほぼゼロコンフィグでいい感じにデプロイファイルを生成してくれます

というわけで覗きにいくと

image.png

なんと!!!!?いつのまにか NITRO_PRESET=firebase が非推奨になっていました

Firebase App Hostingとは???

そもそもこいつなんだ?Firebase Hostingとは違うの?ってことにいまさら気が付き調べてみると

あーーーー

そういえば、年に一度のFirebaseのリリース情報の中にあったようなと記憶が蘇ってきました

なるほど。どちらにせよ困った

一旦何もせずデプロイできるようにするには

Firebase CLIをv14で固めてください

雑感

  • 調べたらFirebase App Hostingは、便利そうではある
  • ただ、Firebaseプロジェクトにガッツリ依存するのもそろそろどうかなーって思ってきたタイミングなので、使わない方向で進めたいなーって思っている
    • Firebaseのいいところは利用しつつ、デプロイパイプラインがFirebaseに乗っかっているところを解消するなどしたい
  • 他のプロダクトはCloud Run + Honoで運用しているので、Cloud Runにしようかなって思い始めてきた
    • あーでも独自ドメインのためにはLBが必要になる〜〜〜
    • まぁでも社内向けプロダクトなので、そんなにアクセス無いはずだし大丈夫そう

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?