nuxt-modules / sitemap

Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.
https://nuxtseo.com/sitemap
MIT License
336 stars 31 forks source link

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

Closed JhumanJ closed 2 days ago

JhumanJ commented 1 month 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 1 month 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 1 month 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 4 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 3 weeks ago

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

harlan-zw commented 3 weeks 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.

JhumanJ commented 1 week ago

You can use https://github.dev/JhumanJ/opnform for a reproduction:

harlan-zw commented 2 days ago

I'm not able to replicate using Linux Mint.

v3 of the Nuxt Site Config module drops support for app config which may solve this, I'll have all of the modules updated to use this version shortly.