d3xter-dev / sitemap-module-nuxt-3

Sitemap Module for Nuxt 3
https://sitemap.nuxtjs.org
MIT License
63 stars 12 forks source link

Netlify deploy: no xml in root #30

Open sharkfin009 opened 1 year ago

sharkfin009 commented 1 year ago

Am generating a perfect xml with dynamic routes locally, but after deploying the sitemap.xml is not there.

From the deploy logs: 6:19:23 AM: [success] Generated /.output/public/sitemap.xml 6:19:23 AM: [success] You can now deploy dist to any static hosting!

If I download and look at the deploy folder, its not there, and /sitemap.xml is returning 404 Am very confused:)

gregoirepuget commented 1 year ago

Same error for me with Netlify

gregoirepuget commented 1 year ago

Was working on local. Then I try a yarn run build, and sitemap isn't working anymore...

In local, even with 'yarn run dev', sitemap is generated in ".output/public/" folder, not on "public" folder

gregoirepuget commented 1 year ago

Working fine on Netlify when I change Publish directory from dist to .output/public. But website isn't working anymore...

omeersari commented 1 year ago

any fix to this ?

omeersari commented 1 year ago

I couldnt fix it, so I found a solution to use another package.

easydrops commented 11 months ago

I couldnt fix it, so I found a solution to use another package.

Facing the same issue here. Mind sharing what solution you ended up with?

andrevferreiraa commented 10 months ago

anyone found a fix for this?

andrevferreiraa commented 10 months ago

Guys, this is related to https://github.com/funkenstudio/sitemap-module-nuxt-3/pull/13 The sitemap is being hardcoded to .outpput/public, but NITRO's preset for netlify uses /dist folder.

My solution was to apply a patch to the package just like this suggestion: https://github.com/funkenstudio/sitemap-module-nuxt-3/issues/17#issuecomment-1327159885

I used yarn 2 instead of pnpm and it's working well.