From b513b2954a7a42588bf176ec8d4ce82c2986abee Mon Sep 17 00:00:00 2001 From: Ferid Zuber Date: Wed, 20 Sep 2023 19:38:41 +0300 Subject: [PATCH 1/2] Fix Issue #6382 Firebase not working for NextJs >=v13.5.0 Fixes https://github.com/firebase/firebase-tools/issues/6382 Due to braking changes on the signature of loadConfig (https://github.com/vercel/next.js/blob/d96e0258de2caf34e9322d0d32ab5748533c4465/packages/next/src/server/config.ts#L784) Firebase does not deploy correctly. --- src/frameworks/next/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frameworks/next/index.ts b/src/frameworks/next/index.ts index ab4c047bc2e..852e9329755 100644 --- a/src/frameworks/next/index.ts +++ b/src/frameworks/next/index.ts @@ -594,7 +594,7 @@ async function getConfig( if (gte(version, "12.0.0")) { const { default: loadConfig } = relativeRequire(dir, "next/dist/server/config"); const { PHASE_PRODUCTION_BUILD } = relativeRequire(dir, "next/constants"); - config = await loadConfig(PHASE_PRODUCTION_BUILD, dir, null); + config = await loadConfig(PHASE_PRODUCTION_BUILD, dir); } else { try { config = await import(pathToFileURL(join(dir, "next.config.js")).toString()); From d23073d1aa8bc800c306b9c06d25e8ffe0b91072 Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Tue, 26 Sep 2023 13:14:25 -0700 Subject: [PATCH 2/2] Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f80b20b3933..81f8f2ea5ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,3 @@ - Fixed an issue where `emulators:export` did not check if the target folder is empty. (#6313) -- Fix "Could not find the next executable" on Next.js deployments (#6372) +- Fixed "Could not find the next executable" on Next.js deployments (#6372) +- Fixed issues caused by breaking changes in Next >=v13.5.0. (#6382)