sitemap-module-nuxt-3 icon indicating copy to clipboard operation
sitemap-module-nuxt-3 copied to clipboard

Netlify deploy: no xml in root

Open sharkfin009 opened this issue 2 years ago • 8 comments

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:)

sharkfin009 avatar Feb 20 '23 04:02 sharkfin009

Same error for me with Netlify

gregoirepuget avatar Mar 03 '23 11:03 gregoirepuget

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 avatar Mar 03 '23 12:03 gregoirepuget

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

gregoirepuget avatar Mar 03 '23 12:03 gregoirepuget

any fix to this ?

omeersari avatar Jul 23 '23 21:07 omeersari

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

omeersari avatar Aug 03 '23 17:08 omeersari

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?

easydrops avatar Oct 11 '23 12:10 easydrops

anyone found a fix for this?

andrevferreiraa avatar Nov 02 '23 12:11 andrevferreiraa

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.

andrevferreiraa avatar Nov 03 '23 01:11 andrevferreiraa