nuxt-modules / sitemap

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

fix: Warning: Export "useNitroApp" was reexported through module #342

Open MickL opened 1 month ago

MickL commented 1 month ago

🐛 The bug

I updated to latest @nuxtjs/seo 2.0.0-rc.18 which is using @nuxtjs/sitemap ^6.0.0-beta.2 and now get an error when building using NITRO_PRESET=cloudflare-pages nuxt build:

Building Nuxt Nitro server (preset: cloudflare-pages)

Export "useNitroApp" of module "../../node_modules/nitropack/dist/runtime/app.mjs" was reexported through module "../../node_modules/nitropack/dist/runtime/index.mjs" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.

Either change the import in "../../node_modules/@nuxtjs/sitemap/dist/runtime/nitro/routes/sitemap_index.xml.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
harlan-zw commented 1 month ago

This is a warning I believe not an error, it's a bit annoying because Nitro is deprecating the app subpath export so not sure what the best solution for the time being is.

MickL commented 1 month ago

You are right, the error came from nuxt-og-image https://github.com/nuxt-modules/og-image/issues/257

rcerljenko commented 4 weeks ago

yep.. same

{A8FFD855-B550-4770-A6DB-4FB16ADE88D4}

mohammadGh commented 1 week ago

I'm getting this warning too.

Nuxt 3.13.2 with Nitro 2.9.7 

This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "node_modules/.../sitemap@6.0.0_h3@..." to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.