404 not found with firebase cloud functions

juloxrox
0
juloxrox
commented 4 months ago

Version

0.2.0

Reproduction link

https://github.com/juloxrox/testsitemap

Steps to reproduce

Hi everyone,
When I do yarn dev or yarn build + yarn start I got sitemap.xml correctly generated when I visit /sitemap.xml.
But when it is served with firebase cloud functions, I get 404 not found. Don't know if it is firebase/nuxt/module related or am I missing something ?

I hosted an exemple here : https://github.com/juloxrox/testsitemap

Does someone has a solution for that please?
Thanks in advance

What is expected ?

200 Response for /sitemap.xml

What is actually happening?

404 not found

bug
0
NicoPennec
1.3k
NicoPennec
commented 13 days ago

Hi @juloxrox

I did some tests with your example (https://github.com/juloxrox/testsitemap) and I confirm that the problem comes from your side.

If I try to add a new page pages/test.vue and deploy it on firebase, but I get the same 404 error.

Then I followed another tutorial on firebase (see https://github.com/williamchong007/nuxt-ssr-firebase) and added the sitemap module. After deploying to Firebase, it works fine (see https://bug-nuxt-sitemap-module.firebaseapp.com/sitemap.xml).

Maybe you could be inspired by this implementation of Functions: https://github.com/williamchong007/nuxt-ssr-firebase/blob/master/functions/index.js

0
Informations
Bug Report โ€ข Open
#c38 - Created 4 months ago