nuxt-modules / robots

Tame the robots crawling and indexing your Nuxt site.
https://nuxtseo.com/robots
412 stars 30 forks source link

empty sitemap since 4.1.0 #137

Closed guy-confetti closed 1 month ago

guy-confetti commented 1 month ago

I'm using @nuxtjs/sitemap@6, and since updating @nuxtjs/robots to 4.1.0 the sitemap.xml returns empty.

see: https://stackblitz.com/edit/nuxt-starter-uk5gcm

harlan-zw commented 1 month ago

Thank you for reporting this, I've pushed up a fix in v4.1.1.

guy-confetti commented 1 month ago

Thanks for the quick response! I've updated to v4.1.1 but I'm still experiencing the issue. production build or order of modules does not affect it. do I need to enable it somehow?

https://stackblitz.com/edit/nuxt-starter-uk5gcm

Skyost commented 1 month ago

Same problem here. Example stacktrace : https://github.com/Skyost/MesCoursDeMaths/actions/runs/10469819778/job/28993654625#step:6:3427.

felixranesberger commented 1 month ago

Same problem here, downgrading to 4.0.2 fixed it:

Works using @nuxtjs/seo@^2.0.0-rc.18 in combination with downgraded @nuxtjs/robots@4.0.2

harlan-zw commented 1 month ago

I'm very sorry about this, it seems like I was missing test coverage on the robot meta tag in production. I've pushed up a fix in v4.1.2 and will release a Nuxt SEO release with this patch now as well.

felixranesberger commented 1 month ago

No Problem, thanks for the quick fix!

Skyost commented 1 month ago

Is the bug fixed for you @felixranesberger ? I have the same problem, even with v4.1.2... Downgrading to v4.0.2 works tho.

felixranesberger commented 1 month ago

Just tried out the new version of @nuxtjs/seo@^2.0.0-rc.19 which uses @nuxtjs/robots@4.1.3 and everything seems to work.

sitemap.xml is filled with entries, also robots.txt and robots-meta-tag seems to work just fine, so no issues on my side.

harlan-zw commented 1 month ago

Thanks for confirming @felixranesberger.

I've tested using Stackblitz to also confirm the issue is solved: https://stackblitz.com/edit/nuxt-starter-kjedrj?file=package.json

Again sorry for the issue, I was moving house yesterday so I thought I could just quickly push up a fix but I missed the case of not having any robot rules. Test cases now cover this properly.