Closed retroriff closed 2 months ago
Try this in your Nuxt config for now:
render: {
etag: {
weak: false
}
}
Thanks, this setting fixes the error. But now it generates a different error when I add i18n: true
:
Cannot restart nuxt: Cannot convert undefined or null to object at
at Function.keys (<anonymous>)
at setDefaultSitemapOptions (node_modules/@nuxtjs/sitemap/lib/options.js:44:28)
at registerSitemap (node_modules/@nuxtjs/sitemap/lib/middleware.js:48:13)
at registerSitemaps (node_modules/@nuxtjs/sitemap/lib/middleware.js:32:5)
at node_modules/@nuxtjs/sitemap/lib/module.js:50:5
at Array.forEach (<anonymous>)
at Object.module (node_modules/@nuxtjs/sitemap/lib/module.js:49:11)
at async installModule (node_modules/@nuxt/kit/dist/index.mjs:427:3)
at async initNuxt (node_modules/nuxt/dist/index.mjs:1787:7)
at async load (node_modules/nuxi/dist/chunks/dev.mjs:6778:9)
at async _applyPromised (node_modules/nuxi/dist/chunks/dev.mjs:6712:10)
When I remove i18n: true
there's no error but the sitemap returns a 404.
@retroriff I don't think this module is compatible with Nuxt 3. See this repo for the current solution - https://github.com/benoitdemaegdt/nuxt3-sitemap
Check https://www.npmjs.com/package/@funken-studio/sitemap-nuxt-3 for a version which works with Nuxt 3 :)
I am getting this error on Nuxt3 after adding the sitemap module to the config file: