Closed acdxxx177 closed 4 months ago
I have tested the modules one by one and found that as long as there are "@nuxtjs/seo", "@nuxtjs/i18n", and "preset: 'cloudflare-pages'" configurations, this issue will definitely occur. Below is my minimal configuration:
// nuxt.config.ts
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ["@nuxtjs/seo", "@nuxtjs/i18n"],
nitro: {
preset: "cloudflare-pages",
prerender: {
autoSubfolderIndex: false,
},
},
ogImage: {
enabled: false,
},
sitemap: {
enabled: false,
},
robots: {
enabled: false,
},
seoExperiments: {
enabled: false,
},
schemaOrg: {
enabled: false,
},
linkChecker: {
enabled: false,
},
});
This seems like an upstream Nitro bug, could you confirm if it's still an issue using latest versions of everything? Will close for now but happy to re-open if you can confirm.
@acdxxx177, setting shamefully-hoist=true
on .npmrc
and reinstalling everything with pnpm
worked for me.
@acdxxx177, setting
shamefully-hoist=true
on.npmrc
and reinstalling everything withpnpm
worked for me. Thanks, it worked for me, I also tried npm, it worked too
Describe the bug
I am currently using the
@nuxtjs/seo
module in my Nuxt 3 project for SEO optimization. However, I encountered an issue when deploying my application to Cloudflare.The error message is as follows:
This error occurs when I set the
NITRO_PRESET
environment variable tocloudflare-pages
and runnuxt build
.Here is the relevant part of my
nuxt.config.ts
:I encounter this error both on the Cloudflare website and locally. If I remove '@nuxtjs/seo' or the 'preset: cloudflare-pages' configuration, the build proceeds without any issues.
Reproduction
No response
System / Nuxt Info