N
Nuxt7mo ago
Fabio

Deployment to Firebase App Hosting

According to the docs, now the recommended way to deploy Nuxt 3 to Firebase is by using the new Firebase App Hosting (https://nuxt.com/deploy/firebase). In my case it doesn't seem to work. The deployment fails, with Firebase not finding the '/workspace/.output/server/index.mjs' module. I suppose App Hosting doesn't run a yarn build before yarn start or that Nitro's preset has some issues. Anyone made it work successfully? If it's marked as "Recommended" way in the docs I assume it's been tested before and someone can help.
6 Replies
kapa.ai
kapa.ai7mo ago
Hi @Fabio. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, I don't see specific information about Firebase App Hosting deployment for Nuxt 3. However, I can offer some insights based on related deployment issues mentioned in the sources. The error you're encountering where Firebase can't find /workspace/.output/server/index.mjs suggests that the build process isn't completing properly before deployment, or the output files aren't being correctly transferred to Firebase. From the knowledge sources, I can see that several users have encountered similar issues with other deployment platforms: 1. One user mentioned Firebase Authentication issues with Nuxt 3, noting that removing the VueFire package resolved their problem Stack Overflow Post. 2. Another document mentions that when using Docker with Nuxt 3, volume mappings in docker-compose can override the built files, causing similar "module not found" errors Stack Overflow Post. 3. There's also a mention of empty .output folders after build in some cases Stack Overflow Post. For troubleshooting, you might want to: 1. Ensure your build process is completing successfully locally before deployment 2. Check if you need to explicitly run the build step in your Firebase configuration 3. Verify that your Firebase configuration is correctly set up to handle Nuxt 3's output structure Unfortunately, the knowledge sources don't contain specific information about Firebase App Hosting deployment for Nuxt 3 or the recommended configuration mentioned in the Nuxt documentation. If the issue persists, you might want to check the official Nuxt documentation or Firebase documentation for the most up-to-date guidance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai7mo ago
<@161918191084240896> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Fabio
FabioOP7mo ago
Any real person?
Paul Geraghty
Paul Geraghty5mo ago
Hi, did you get this working? I'd be super interested to hear how it went.
Paul Geraghty
Paul Geraghty5mo ago
I think: https://nuxt.com/deploy/firebase may be out of date
Nuxt
Deploy Nuxt to Firebase
Deploy your Nuxt Application to Firebase infrastructure.
aonghas
aonghas4mo ago
I'm in the same boat..

Did you find this page helpful?