Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Nitro/Unenv] cloudflare_pages build error: Could not resolve import string_decoder #1821

Open
andrevandal opened this issue Oct 11, 2023 · 38 comments
Labels
bug Something isn't working unenv

Comments

@andrevandal
Copy link

Environment

  • node: 18.16.1
  • nuxt: 3.7.4
  • drizzle-kit: 0.19.13
  • @nuxtjs/tailwindcss: 6.8.0
  • @planetscale/database: 1.11.0
  • drizzle-orm: 0.28.6
  • pnpm: 8.9.0

Reproduction

Clone the repo: https://github.com/andrevandal/ondevamos-web/tree/start-backend
Build.

I tried to build it through pnpm and npm, but both got errors.

Describe the bug

When building the nuxt project, we got the error:

ℹ Building Nitro Server (preset: cloudflare_pages)                           nitro 2:18:00 PM
(node-resolve plugin) Could not resolve import "unenv/runtime/node/string_decoder/index/" in /Users/andre.vandal/projects/github.com/andrevandal/ondevamos-web/node_modules/readable-stream/lib/_stream_readable.js using exports defined in /Users/andre.vandal/projects/github.com/andrevandal/ondevamos-web/node_modules/unenv/package.json.

[nitro 2:18:03 PM]  ERROR  Error: Cannot resolve "unenv/runtime/node/string_decoder/index/" from "/Users/andre.vandal/projects/github.com/andrevandal/ondevamos-web/node_modules/readable-stream/lib/_stream_readable.js" and externals are not allowed!


undefined


[2:18:03 PM]  ERROR  Cannot resolve "unenv/runtime/node/string_decoder/index/" from "/Users/andre.vandal/projects/github.com/andrevandal/ondevamos-web/node_modules/readable-stream/lib/_stream_readable.js" and externals are not allowed!

  at Object.resolveId (node_modules/nuxt/node_modules/nitropack/dist/shared/nitro.0093b44c.mjs:1879:17)
  at async PluginDriver.hookFirstAndGetPlugin (node_modules/rollup/dist/es/shared/node-entry.js:25444:28)
  at async resolveId (node_modules/rollup/dist/es/shared/node-entry.js:24117:26)
  at async ModuleLoader.resolveId (node_modules/rollup/dist/es/shared/node-entry.js:24531:15)
  at async PluginDriver.hookFirstAndGetPlugin (node_modules/rollup/dist/es/shared/node-entry.js:25444:28)
  at async resolveId (node_modules/rollup/dist/es/shared/node-entry.js:24117:26)
  at async ModuleLoader.resolveId (node_modules/rollup/dist/es/shared/node-entry.js:24531:15)
  at async node_modules/@rollup/plugin-commonjs/dist/es/index.js:781:16
  at async Promise.all (index 10)
  at async node_modules/@rollup/plugin-commonjs/dist/es/index.js:773:32

Additional context

Related issues:

Logs

No response

@DHartenfels
Copy link

I've got the same error with "vercel-edge" Preset:

ℹ Building Nitro Server (preset: vercel-edge)                                    nitro 21:32:11
(node-resolve plugin) Could not resolve import "unenv/runtime/node/string_decoder/index/" in D:\BisschenProggen\shopifyInspector\node_modules\lambdafs\node_modules\tar-stream\node_modules\readable-stream\lib\_stream_readable.js using exports defined in D:\BisschenProggen\shopifyInspector\node_modules\unenv\package.json.

[nitro 21:32:13]  ERROR  Error: Cannot resolve "unenv/runtime/node/string_decoder/index/" from "D:\\BisschenProggen\\shopifyInspector\\node_modules\\lambdafs\\node_modules\\tar-stream\\node_modules\\readable-stream\\lib\\_stream_readable.js" and externals are not allowed!


undefined


[21:32:13]  ERROR  Cannot resolve "unenv/runtime/node/string_decoder/index/" from "D:\\BisschenProggen\\shopifyInspector\\node_modules\\lambdafs\\node_modules\\tar-stream\\node_modules\\readable-stream\\lib\\_stream_readable.js" and externals are not allowed!

  at Object.resolveId (/D:/BisschenProggen/shopifyInspector/node_modules/nitropack/dist/shared/nitro.0093b44c.mjs:1879:17)
  at async PluginDriver.hookFirstAndGetPlugin (/D:/BisschenProggen/shopifyInspector/node_modules/rollup/dist/es/shared/node-entry.js:25444:28)
  at async resolveId (/D:/BisschenProggen/shopifyInspector/node_modules/rollup/dist/es/shared/node-entry.js:24117:26)
  at async ModuleLoader.resolveId (/D:/BisschenProggen/shopifyInspector/node_modules/rollup/dist/es/shared/node-entry.js:24531:15)
  at async PluginDriver.hookFirstAndGetPlugin (/D:/BisschenProggen/shopifyInspector/node_modules/rollup/dist/es/shared/node-entry.js:25444:28)
  at async resolveId (/D:/BisschenProggen/shopifyInspector/node_modules/rollup/dist/es/shared/node-entry.js:24117:26)
  at async ModuleLoader.resolveId (/D:/BisschenProggen/shopifyInspector/node_modules/rollup/dist/es/shared/node-entry.js:24531:15)
  at async /D:/BisschenProggen/shopifyInspector/node_modules/@rollup/plugin-commonjs/dist/es/index.js:781:16
  at async Promise.all (index 10)
  at async /D:/BisschenProggen/shopifyInspector/node_modules/@rollup/plugin-commonjs/dist/es/index.js:773:32



[21:32:13]  ERROR  Cannot resolve "unenv/runtime/node/string_decoder/index/" from "D:\\BisschenProggen\\shopifyInspector\\node_modules\\lambdafs\\node_modules\\tar-stream\\node_modules\\readable-stream\\lib\\_stream_readable.js" and externals are not allowed!

This is my package.json file:

{
  "name": "nuxt-app",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "devDependencies": {
    "@nuxt/devtools": "latest",
    "@nuxtjs/tailwindcss": "^6.8.0",
    "nuxt": "^3.7.4",
    "unenv": "^1.7.4",
    "vue": "^3.3.4",
    "vue-router": "^4.2.5"
  },
  "dependencies": {
    "chrome-aws-lambda": "^10.1.0",
    "puppeteer": "^10.1.0",
    "puppeteer-core": "^10.4.0"
  }
}

Building on

Building Nitro Server (preset: node-server)   

is fine without any problems

@Gruce
Copy link

Gruce commented Oct 20, 2023

Same but a different module:

[error] [nitro] Error: Cannot resolve "bufferutil" from "/opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/ws/lib/buffer-util.js" and externals are not allowed!

@vptill
Copy link

vptill commented Oct 31, 2023

Having the same issue

[error] Cannot resolve "unenv/runtime/node/string_decoder/index/" from "/opt/buildhome/repo/node_modules/imap/node_modules/readable-stream/lib/_stream_readable.js" and externals are not allowed!

@ManasMadrecha
Copy link

Any solution to this? I am currently on firebase preset (with no error) and want to try cloudflare. Changing the preset to cloudflare-pages gives this error.

@aw-0
Copy link

aw-0 commented Dec 16, 2023

Currently trying to build via the deployment guide for cloudflare and getting this exact same error. Any updates on this?

@megatheikal
Copy link

Same but a different module:

[error] [nitro] Error: Cannot resolve "bufferutil" from "/opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/ws/lib/buffer-util.js" and externals are not allowed!

try yarn add bufferutil utf-8-validate. it worked for me

@Gruce
Copy link

Gruce commented Jan 10, 2024

Same but a different module:

[error] [nitro] Error: Cannot resolve "bufferutil" from "/opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/ws/lib/buffer-util.js" and externals are not allowed!

try yarn add bufferutil utf-8-validate. it worked for me

This workaround confirmed.

But it may cause another bug on cloudflare:
image

Thank you.

@zakarialounes
Copy link

zakarialounes commented Jan 11, 2024

In my nuxt.config.ts file I have this, if it helps

    rollupConfig: {
      external: ["bufferutil", "utf-8-validate"],
      output: {
        generatedCode: {
          symbols: true,
        },
      },
    },

@HassanKadhim
Copy link

In my nuxt.config.ts file I have this, if it helps

    rollupConfig: {
      external: ["bufferutil", "utf-8-validate"],
      output: {
        generatedCode: {
          symbols: true,
        },
      },
    },

Same problem, nothing changed.

@andrevandal
Copy link
Author

the problem is that unenv ins't converting JavaScript code to Cloudflare compatible code.

adding modules to external (#1821 (comment)) just says to rollup this module will be available in runtime, which isn't (#1821 (comment)).

this is the map table of how unenv convert some modules:
https://github.com/unjs/unenv?tab=readme-ov-file#built-in-nodejs-modules

@elliotjarnit
Copy link

Was a solution ever found to @andrevandal's problem? It seems like him and many others are experiencing the same issue with no luck.

@devbrains-com

This comment was marked as duplicate.

@larify

This comment was marked as duplicate.

@pi0
Copy link
Member

pi0 commented Feb 2, 2024

Hi. We are aware and this issue is under the track.

The issue is that you are using a library that is designed for Node.js and when trying to deploy to Cloudflare pages, Nitro (while trying to fix this with unenv) is not covering some subpath compatibility.

I should spend more time investigating what exact library is incompatible and a minimal (nitro only with only problematic dependency) could help to speed this up.

@milindanath
Copy link

I got the exact same issue when importing firebase-admin inside a nitro plugin. But I figured out that it was the import that was incorrect. A minimal reproduction can be found at https://stackblitz.com/edit/github-znntty

The incorrect version was

import admin from 'firebase-admin';

export default defineNitroPlugin((nitro) => {
  const test = admin.initializeApp;
});

The errors disappeared after correcting the code to the following.

import { initializeApp } from 'firebase-admin/app';

export default defineNitroPlugin((nitro) => {
  const test = initializeApp;
});

@kylebuxton
Copy link

I got the exact same issue when importing firebase-admin inside a nitro plugin. But I figured out that it was the import that was incorrect. A minimal reproduction can be found at https://stackblitz.com/edit/github-znntty

The incorrect version was

import admin from 'firebase-admin';

export default defineNitroPlugin((nitro) => {
  const test = admin.initializeApp;
});

The errors disappeared after correcting the code to the following.

import { initializeApp } from 'firebase-admin/app';

export default defineNitroPlugin((nitro) => {
  const test = initializeApp;
});

I made this change but it didn't work on my end, I'm still getting the same error "Cannot resolve "unenv/runtime/node/string_decoder/index/""

@elliotjarnit
Copy link

after some research the problem seems to be with
import {getFirestore} from "firebase-admin/firestore";
as when I remove this import, building works perfectly.

I don't know why this could be but I will keep looking.

@AmirMechouk
Copy link

Can add the following library also to the issue list
[nitro] Error: Cannot resolve "aws-sdk" from "/opt/atlassian/pipelines/agent/build/node_modules/@opensearch-project/opensearch/lib/aws/AwsSigv4Signer.js" and externals are not allowed!

@Mgoeloe
Copy link

Mgoeloe commented Apr 12, 2024

Same with KnexJS

[error] [nitro] Error: Cannot resolve "pg" from "/opt/buildhome/repo/node_modules/knex/lib/dialects/redshift/index.js" and externals are not allowed!

@mrbubbaz
Copy link

mrbubbaz commented May 3, 2024

Same with String_decoder (?)

[error] Cannot resolve "unenv/runtime/node/string_decoder/index/" from "/opt/buildhome/repo/node_modules/readable-stream/lib/_stream_readable.js" and externals are not allowed!

@chuckntaylor
Copy link

Any chance you have set an env variable like NODE_ENV=production?

If you did, then it is possible that the development dependencies are not being installed by Cloudflare before the build phase. For my purposes, I did want to set NODE_ENV for my development and production builds and so I had to make sure that development dependencies were installed.

npm install --include=dev

If you are trying to run different commands for different branches, I would recommend the following:

  1. Create separate build scripts in your package.json. Could be something like:
"scripts": {
    "build": "vite build",
    "build:dev": "vite build --mode development",
  }
  1. Create a new file at your project root build.sh - Make sure to update if CF_PAGES_BRANCH statements with the name of your git branches. I am using branches prod and dev in my example.
# !/bin/bash

if [ "$CF_PAGES_BRANCH" == "prod" ]; then
  # Run the "production" script in `package.json` on the "prod" branch
  # "prod" should be replaced with the name of your Production branch

  echo "In Production - make sure dev dependencies are installed"
  npm install --include=dev
  echo "Building for Production"
  npm run build

elif [ "$CF_PAGES_BRANCH" == "dev" ]; then
  # Run the "dev" script in `package.json` on the "dev" branch
  # "dev" should be replaced with the name of your specific branch

  echo "Building for Development"
  npm run build:dev

else
  # Else run the dev script
  echo "Unrecognized Branch: $CF_PAGES_BRANCH"
  npm run build:dev
fi
  1. Lastly, in your Cloudflare dashboard for the project, make sure you specify the build command to be bash build.sh

This will make sure that your branch prod in my example is running npm install --include=dev before the build, and is installing all the packages.

@CodyBontecou
Copy link

Hi. We are aware and this issue is under the track.

The issue is that you are using a library that is designed for Node.js and when trying to deploy to Cloudflare pages, Nitro (while trying to fix this with unenv) is not covering some subpath compatibility.

I should spend more time investigating what exact library is incompatible and a minimal (nitro only with only problematic dependency) could help to speed this up.

This ended up being the issue. My specific dependency was node-telegram-bot-api. After removing it, the build was successful.

Something worth noting - this error was happening even during my local build, not specific to cloudflare.

@provok-me
Copy link

provok-me commented Jun 30, 2024

Same with Netlify (netlify_edge) and Sharp:

[error] [nitro] Error: Cannot resolve "@img/sharp-wasm32/versions" from "/opt/build/repo/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/utility.js" and externals are not allowed!

@zou-yu
Copy link

zou-yu commented Jul 6, 2024

Any updates? I'am facing same problem with argon2:


[error] [nitro] Error: Cannot resolve "./argon2.win32-x64-msvc.node" from "/opt/buildhome/repo/node_modules/.pnpm/@[email protected]/node_modules/@node-rs/argon2/index.js" and externals are not allowed!
--

@Pachara
Copy link

Pachara commented Jul 17, 2024

No body sloved this issue ?
I got exactly same error

[info] [nitro] Building Nuxt Nitro server (preset: cloudflare-pages)

19:06:13.652 | [plugin node-resolve] Could not resolve import "unenv/runtime/node/string_decoder/index/" in /opt/buildhome/repo/node_modules/readable-stream/lib/_stream_readable.js using exports defined in /opt/buildhome/repo/node_modules/unenv/package.json.

@Mgoeloe
Copy link

Mgoeloe commented Jul 17, 2024

No body sloved this issue ?
I got exactly same error

[info] [nitro] Building Nuxt Nitro server (preset: cloudflare-pages)

19:06:13.652 | [plugin node-resolve] Could not resolve import "unenv/runtime/node/string_decoder/index/" in /opt/buildhome/repo/node_modules/readable-stream/lib/_stream_readable.js using exports defined in /opt/buildhome/repo/node_modules/unenv/package.json.

Using polyfills might work.

@Pachara
Copy link

Pachara commented Jul 17, 2024

No body sloved this issue ?
I got exactly same error

[info] [nitro] Building Nuxt Nitro server (preset: cloudflare-pages)

19:06:13.652 | [plugin node-resolve] Could not resolve import "unenv/runtime/node/string_decoder/index/" in /opt/buildhome/repo/node_modules/readable-stream/lib/_stream_readable.js using exports defined in /opt/buildhome/repo/node_modules/unenv/package.json.

Using polyfills might work.

I try, It not working.
No mater what we try to by pass, it not working

@ryoid
Copy link

ryoid commented Jul 24, 2024

Hi. We are aware and this issue is under the track.

The issue is that you are using a library that is designed for Node.js and when trying to deploy to Cloudflare pages, Nitro (while trying to fix this with unenv) is not covering some subpath compatibility.

I should spend more time investigating what exact library is incompatible and a minimal (nitro only with only problematic dependency) could help to speed this up.

Encountered similar issue, was not sure if I should comment here so I made a new issue with minimal repro. #2631

@Dmytro-Tihunov
Copy link

faced with same, is there any updates?

@clopezpro
Copy link

Same with Netlify (netlify_edge) and Sharp:

[error] [nitro] Error: Cannot resolve "@img/sharp-wasm32/versions" from "/opt/build/repo/node_modules/.pnpm/[email protected]/node_modules/sharp/lib/utility.js" and externals are not allowed!

Maybe it's because I use NuxtImg

<body>
<!--StartFragment-->
14:10:46.355 | [info] .nuxt/dist/server/server.mjs                                          395.63 kB │ map: 880.46 kB
-- | --
14:10:46.356 | [info] ✓ built in 13.29s
14:10:46.358 | [success] Server built in 13306ms
14:10:46.472 | [success] [nitro] Generated public dist
14:10:46.512 | [info] [nitro] Building Nuxt Nitro server (preset: `cloudflare-pages`)
14:11:03.363 | [error] [nitro] Error: Cannot resolve "@img/sharp-wasm32/versions" from "/opt/buildhome/repo/node_modules/sharp/lib/utility.js" and externals are not allowed!
14:11:03.363 |  
14:11:03.363 |  
14:11:03.363 | undefined
14:11:03.367 | [error] Cannot resolve "@img/sharp-wasm32/versions" from "/opt/buildhome/repo/node_modules/sharp/lib/utility.js" and externals are not allowed!
14:11:03.367 | at Object.resolveId (node_modules/nitropack/dist/nitro.mjs:1970:17)
14:11:03.368 | at async PluginDriver.hookFirstAndGetPlugin (node_modules/rollup/dist/es/shared/node-entry.js:19674:28)
14:11:03.368 | at async resolveId (node_modules/rollup/dist/es/shared/node-entry.js:18355:26)
14:11:03.368 | at async ModuleLoader.resolveId (node_modules/rollup/dist/es/shared/node-entry.js:18758:15)
14:11:03.368 | at async node_modules/@rollup/plugin-commonjs/dist/es/index.js:785:16
14:11:03.368 | at async Promise.all (index 5)
14:11:03.368 | at async node_modules/@rollup/plugin-commonjs/dist/es/index.js:777:32
14:11:03.369 | at async rewriteRequireExpressionsAndGetImportBlock (node_modules/@rollup/plugin-commonjs/dist/es/index.js:1354:28)
14:11:03.369 | at async transformCommonjs (node_modules/@rollup/plugin-commonjs/dist/es/index.js:1933:23)
14:11:03.370 | at async transform (node_modules/rollup/dist/es/shared/node-entry.js:18676:16)
14:11:03.371 |  
14:11:03.371 | [error] Cannot resolve "@img/sharp-wasm32/versions" from "/opt/buildhome/repo/node_modules/sharp/lib/utility.js" and externals are not allowed!
14:11:03.599 | Failed: Error while executing user command. Exited with error code: 1
14:11:03.610 | Failed: build command exited with code: 1
14:11:05.352 | Failed: error occurred while running build command

<!--EndFragment-->
</body>
</html>
```

@alexis-fresard
Copy link

Solution found !

Hello everyone, I found a solution to this problem that worked for me.

In my project folder. I went to the file nuxt.config.ts and I added the following lines

export default {
  alias: {
    'string_decoder': 'string_decoder/',
  },
}

Then I built the project and now it works perfectly for me.

@timpulver
Copy link

timpulver commented Aug 21, 2024

Same issue with vue3-moveable on NuxtHub (cloudflare-pages preset):

[info] [nitro] Building Nuxt Nitro server (preset: cloudflare-pages)
[error] [nitro] Error: Cannot resolve "vue3-moveable" from "/opt/buildhome/repo/.nuxt/dist/server/_nuxt/id.client-BV76-_Rs.js" and externals are not allowed!

This happens with default exports, as well as named exports.

Are there any workarounds or ways how to find out which sub-dependencies are causing the problem?

@brendonmatos
Copy link
Contributor

alias: {
'string_decoder': 'string_decoder/',
},

Solved my issue! Thanks

@paulvonber
Copy link

all the solutions provided didn't help. Is there anything else not posted here yet that could help?

@sugoidesune
Copy link

sugoidesune commented Sep 19, 2024

I can deploy nuxt with

ssr: false

but with true i get that error.
This fixed it. Throws an error during render but it works.

export default {
  alias: {
    'string_decoder': 'string_decoder/',
  },
}
▲ [WARNING] Non-relative path "string_decoder/" is not allowed when "baseUrl" is not set (did you forget a leading "./"?) [tsconfig.json]

In the end the worker exceeded 1MiB so i couldn't test yet.

@Aybee5
Copy link

Aybee5 commented Oct 8, 2024

Solution found !

Hello everyone, I found a solution to this problem that worked for me.

In my project folder. I went to the file nuxt.config.ts and I added the following lines

export default {
  alias: {
    'string_decoder': 'string_decoder/',
  },
}

Then I built the project and now it works perfectly for me.

This works for building, but now my server route is returning 500, I am using the node-telegram-bot-api package

@DavidFrings
Copy link

I have the same problem...

Here is a shortet version of my logs:

Detected the following tools from environment: nodejs@20.12.2, pnpm@9.12.2
dependencies:
	+ hammerjs 2.0.8
	+ nuxt 3.13.2
	+ prettier 3.3.3
	+ vue 3.5.11
	+ vue-router 4.4.5
	
devDependencies:
	+ @emotion/css 11.13.4
	+ @nuxtjs/i18n 9.0.0-rc.2
	+ @nuxtjs/sitemap 6.1.2
	+ @vite-pwa/nuxt 0.10.5
	+ nuxt-security 2.0.0

Executing user command: pnpm install && pnpm run format && pnpm run build --if-present

> nuxt build "--if-present"
[log] Nuxt 3.13.2 with Nitro 2.9.7
[success] Client built in 2496ms
[info] Building server...
[info][vite v5.4.8] building SSR bundle for production...�
[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
[success] Server built in 1705ms
[success] [nitro] Generated public dist

PWA v0.20.5
mode      generateSW
precache  3 entries (0.41 KiB)
files generated
 dist/sw.js
 dist/workbox-cbf83eee.js

[info] [nitro] Building Nuxt Nitro server (preset: `cloudflare_pages`)
[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".


1: import { stdin, stdout } from "node:process";
	            ^
2: import f from "node:readline";
3: import { WriteStream } from "node:tty";

[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".
	  at getRollupError (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/parseAst.js:395:41)
	  at error (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/parseAst.js:391:42)
	  at Module.error (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:15535:16)
	  at Module.traceVariable (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:15984:29)
	  at ModuleScope.findVariable (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:13770:39)
	  at ChildScope.findVariable (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:5252:38)
	  at ClassBodyScope.findVariable (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:5252:38)
	  at ChildScope.findVariable (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:5252:38)
	  at ChildScope.findVariable (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:5252:38)
	  at FunctionScope.findVariable (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:5252:38)
	  at Identifier.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:5035:40)
	  at AssignmentPattern.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:2855:23)
	  at Property.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:2855:23)
	  at ObjectPattern.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:2851:28)
	  at FunctionExpression.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:2851:28)
	  at MethodDefinition.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:2855:23)
	  at ClassBody.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:2851:28)
	  at ClassDeclaration.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:2855:23)
	  at Program.bind (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:2851:28)
	  at Module.bindReferences (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:15514:18)
	  at Graph.sortModules (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:21019:20)
	  at Graph.build (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:20922:14)
	  at async node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:21607:13
	  at async catchUnfinishedHookActions (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:21076:16)
	  at async rollupInternal (node_modules/.pnpm/rollup@4.24.0/node_modules/rollup/dist/es/shared/node-entry.js:21602:5)
	  at async _build (node_modules/.pnpm/nitropack@2.9.7_magicast@0.3.5/node_modules/nitropack/dist/nitro.mjs:2633:20)
	  at async node_modules/.pnpm/nuxt@3.13.2_@parcel+watcher@2.4.1_@types+node@22.7.4_eslint@9.13.0_jiti@2.3.1__ioredis@5.4.1__5dzmqmjnledb6iljrfoadnkny4/node_modules/nuxt/dist/index.mjs:3630:5
	  at async build (node_modules/.pnpm/nuxt@3.13.2_@parcel+watcher@2.4.1_@types+node@22.7.4_eslint@9.13.0_jiti@2.3.1__ioredis@5.4.1__5dzmqmjnledb6iljrfoadnkny4/node_modules/nuxt/dist/index.mjs:5778:3)
	  at async Object.run (node_modules/.pnpm/nuxi@3.14.0/node_modules/nuxi/dist/chunks/build.mjs:101:5)
	  at async runCommand$1 (node_modules/.pnpm/nuxi@3.14.0/node_modules/nuxi/dist/shared/nuxi.3e201632.mjs:1648:16)
	  at async runCommand$1 (node_modules/.pnpm/nuxi@3.14.0/node_modules/nuxi/dist/shared/nuxi.3e201632.mjs:1639:11)
	  at async runMain$1 (node_modules/.pnpm/nuxi@3.14.0/node_modules/nuxi/dist/shared/nuxi.3e201632.mjs:1777:7) 

[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".
Command failed with exit code 1.

Is it because of the ssr?

Can someone help me?

@DavidFrings
Copy link

nuxt-modules/sitemap#380 (comment)

worked for me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unenv
Projects
None yet
Development

No branches or pull requests