nuxt-modules / sitemap

Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.
https://nuxtseo.com/sitemap
334 stars 30 forks source link

#internal/nitro/virtual/app-config is not defined in package #374

Open JhumanJ opened 3 weeks ago

JhumanJ commented 3 weeks ago

Hi there, same issue as https://github.com/nuxt/icon/issues/204 with this package. Fix seems to be here: https://github.com/nuxt/icon/pull/249

JhumanJ commented 3 weeks ago

Not very familiar with nitro, but looking af the PR fixing nuxt icon, it seems like the imports in these files needs to be changed from nitropack/runtime to #imports. Sorry for not being able to push this further!

JhumanJ commented 3 weeks ago

Just realized that nuxt-content was a dependency of this, so the issue could just come from them: https://github.com/nuxt/content/issues/2736 https://github.com/nuxt/content/pull/2787

saltytostitos commented 2 weeks ago

I also have this problem as soon as adding @nuxtjs/sitemap as a nuxt module. i went through every nitropack import and replaced with #imports ... and this didn't fix it. So I went through every dependency of sitemap that has a nitropack import and replaced with #imports and this did fixed it.

Not sure "which" change helped or if all were required to fix my problem. sitemap robots nuxt-site-config devtools-kit @nuxt/kit

What's the best way to prevent doing this? bash makes this easy but where's the root cause of this?

JhumanJ commented 1 week ago

@harlan-zw I'd really appreciate if you could take a look

harlan-zw commented 1 week ago

Most likely related to the Site Config module trying to read config from the app config when it's not enabled for some reason.

If you have a reliable way to replicate it, it would help. I've never personally come across this.

Otherwise, I'll look if it's possible to drop support for it without breaking anyones site.