Cloudflare pages - Error with @nuxtjs/sitemap

What is the name of the domain?

What is the error message?

[info] [nitro] Building Nuxt Nitro server (preset: `cloudflare-pages`) 22:12:28.554	[error] [nitro] RollupError: .nuxt/dist/server/_nuxt/prompt-BGYTzdFy.js (1:9): "stdin" is not exported by "node_modules/.pnpm/[email protected]/node_modules/unenv/runtime/node/process/index.mjs", imported by ".nuxt/dist/server/_nuxt/prompt-BGYTzdFy.js". 22:12:28.554	 22:12:28.554	 22:12:28.554	1: import { stdin, stdout } from "node:process"; 22:12:28.554	            ^ 22:12:28.554	2: import f from "node:readline"; 22:12:28.554	3: import { WriteStream } from "node:tty"; 22:12:28.556	[error] .nuxt/dist/server/_nuxt/prompt-BGYTzdFy.js (1:9): "stdin" is not exported by "node_modules/.pnpm/[email protected]/node_modules/unenv/runtime/node/process/index.mjs", imported by ".nuxt/dist/server/_nuxt/prompt-BGYTzdFy.js".

What is the issue you’re encountering

can’t run website

What steps have you taken to resolve the issue?

install @nuxtjs/sitemap
run on cloudflare pages

I read the logs again and I think it’s a problem with i18n:

[plugin unplugin-vue-i18n:directive] Sourcemap is likely to be incorrect: a plugin (unplugin-vue-i18n:directive) was used to transform files, but didn’t generate a sourcemap for the transformation. Consult the plugin documentation for help

But I don’t know what the problem is… on my local maschine I can run the build command

My PC:

Building Nuxt Nitro server (preset: node-server)                                                                                                                      nitro 10:52:38 PM
Export "useNitroApp" of module "node_modules/.pnpm/[email protected][email protected]/node_modules/nitropack/dist/runtime/app.mjs" was reexported through module "node_modules/.pnpm/[email protected][email protected]/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/.pnpm/@[email protected][email protected][email protected][email protected][email protected]_@[email protected]_te_tfveaffop7pqxer7mlr7qkutg4/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.  
✔ Nuxt Nitro server built

Cloudflare pages:

[info] [nitro] Building Nuxt Nitro server (preset: `cloudflare-pages`)
22:12:28.554	[error] [nitro] RollupError: .nuxt/dist/server/_nuxt/prompt-BGYTzdFy.js (1:9): "stdin" is not exported by "node_modules/.pnpm/[email protected]/node_modules/unenv/runtime/node/process/index.mjs", imported by ".nuxt/dist/server/_nuxt/prompt-BGYTzdFy.js".
22:12:28.554	
22:12:28.554	
22:12:28.554	1: import { stdin, stdout } from "node:process";
22:12:28.554	            ^
22:12:28.554	2: import f from "node:readline";
22:12:28.554	3: import { WriteStream } from "node:tty";
22:12:28.556	[error] .nuxt/dist/server/_nuxt/prompt-BGYTzdFy.js (1:9): "stdin" is not exported by "node_modules/.pnpm/[email protected]/node_modules/unenv/runtime/node/process/index.mjs", imported by ".nuxt/dist/server/_nuxt/prompt-BGYTzdFy.js".
22:12:28.557	  at getRollupError (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/parseAst.js:395:41)

I see that my PC has (preset: node-server) and Cloudflare Pages has (preset: cloudflare-pages) but what is the problem…

Hi,
have you found any solution for this? I have similar error and no idea how to solve:

[error] .nuxt/dist/server/_nuxt/prompt-ovLvYyyC.js (1:9): “stdin” is not exported by “node_modules/.pnpm/[email protected]/node_modules/unenv/runtime/node/process/index.mjs”, imported by “.nuxt/dist/server/_nuxt/prompt-ovLvYyyC.js”.

I didn’t find any solutions, because soon I will be hosting by my self… so I stopped searching

ok, maybe it will help someone else as I finally figured it out:

  1. Delete .node_modules and .nuxt folder,
  2. nuxt.config.ts:
 nitro: {
    preset: 'cloudflare-pages',
  },
  experimental: {
    payloadExtraction: false
  },
build: {
    transpile: ['lucide-vue-next', 'unenv'],
  },
  1. in package.json specify vue version (it is for pinia dependecies issues when using npm, if you do not have pinia not neeeded)
"dependencies": {
    "vue": "^3.5.12",

And finally after many tires it went ok.

It didn’t worked for me but for others here is the github issue:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.