You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a fresh nuxt install that was created using npx nuxi@latest init
Open the repo.
Run npm i to install deps.
Run firebase init --debug
Choose only Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys.
Use and existing project or create a new one.
[REQUIRED] Expected behavior
Firebase init sets up the firebase project for the repo.
[REQUIRED] Actual behavior
The command fails due to a recent(ish) update in nuxt/kit.
TypeError: Cannot create property 'overrides' on string '/Users/JCGeek/Documents/Projects/firebase-tools-issue/nuxt-app'
at loadNuxtConfig (file:///Users/JCGeek/Documents/Projects/firebase-tools-issue/nuxt-app/node_modules/@nuxt/kit/dist/index.mjs:2581:18)
at async getConfig (/Users/JCGeek/.nvm/versions/node/v20.14.0/lib/node_modules/firebase-tools/lib/frameworks/nuxt/index.js:92:12)
at async discover (/Users/JCGeek/.nvm/versions/node/v20.14.0/lib/node_modules/firebase-tools/lib/frameworks/nuxt/index.js:28:37)
at async discover (/Users/JCGeek/.nvm/versions/node/v20.14.0/lib/node_modules/firebase-tools/lib/frameworks/index.js:47:32)
at async doSetup (/Users/JCGeek/.nvm/versions/node/v20.14.0/lib/node_modules/firebase-tools/lib/init/features/hosting/index.js:54:11)
at async init (/Users/JCGeek/.nvm/versions/node/v20.14.0/lib/node_modules/firebase-tools/lib/init/index.js:39:9)
Research
It looks like firebase-tools is calling loadNuxtConfig(dir)here and passing in dir as a string.
In a recent Nuxt update that was made in PR here loadNuxtConfig now requires an object to be passed in.
Quick Fix
Downgrade nuxt to v3.11.2 - npm i [email protected], and explicitly install @nuxt/kit at 3.11.2 - npm i -D @nuxt/[email protected].
Run firebase init and it should work.
Actual fix
Pass an object through to loadNuxtConfig() - it seems as though passing the dir through has no affect at least in firebase init.
[REQUIRED] Environment info
firebase-tools: 13.11.4
Platform: macOS
[REQUIRED] Test case
https://github.com/JamieCurnow/firebase-web-framework-nuxt-loadNuxtConfig
[REQUIRED] Steps to reproduce
This is a fresh nuxt install that was created using
npx nuxi@latest init
Open the repo.
Run
npm i
to install deps.Run
firebase init --debug
Choose only
Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys
.Use and existing project or create a new one.
[REQUIRED] Expected behavior
Firebase init sets up the firebase project for the repo.
[REQUIRED] Actual behavior
The command fails due to a recent(ish) update in nuxt/kit.
Research
It looks like
firebase-tools
is callingloadNuxtConfig(dir)
here and passing indir
as a string.In a recent Nuxt update that was made in PR here loadNuxtConfig now requires an object to be passed in.
Quick Fix
Downgrade nuxt to v3.11.2 -
npm i [email protected]
, and explicitly install @nuxt/kit at 3.11.2 -npm i -D @nuxt/[email protected]
.Run
firebase init
and it should work.Actual fix
Pass an object through to loadNuxtConfig() - it seems as though passing the dir through has no affect at least in firebase init.
I'll test a deploy and put up a PR.
The text was updated successfully, but these errors were encountered: