Repository: vikejs/vike

Issue #2410: "You stumbled upon a Vike bug." after upgrading 0.4.225 -> 0.4.228
Created: 2025-04-23T22:47:11Z
Description
I tried to update from 0.4.225 -> 0.4.228 and got this error during my pnpm build:
> vike build

Error during build:
Error: Build failed with 1 error:
node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1226:21: ERROR: [plugin: vike-esbuild] [vike@0.4.228][Bug] You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new?template=bug.yml and copy-paste this error. A maintainer will fix the bug (usually within 24 hours).
    at failureErrorWithLog (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1476:15)
    at /Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:945:25
    at runOnEndCallbacks (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1316:45)
    at buildResponseToResult (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:943:7)
    at /Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:970:16
    at responseCallbacks.<computed> (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:622:9)
    at handleIncomingPacket (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:677:12)
    at Socket.readFromStdout (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:600:7)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter],
  _formatted: '\x1B[31mFailed to transpile\x1B[39m \x1B[1m\x1B[31m/interface/+config.ts\x1B[39m\x1B[22m \x1B[31mbecause:\x1B[39m\n' +
    '\x1B[31m✘ \x1B[41;31m[\x1B[41;97mERROR\x1B[41;31m]\x1B[0m \x1B[1m[vike@0.4.228]\x1B[1m\x1B[31m[Bug]\x1B[39m\x1B[22m You stumbled upon a Vike bug. Go to \x1B[4mhttps://github.com/vikejs/vike/issues/new?template=bug.yml\x1B[24m and copy-paste this error. A maintainer will fix the bug (usually within 24 hours).\x1B[0m \x1B[1m\x1B[35m[plugin vike-esbuild]\x1B[0m\n' +
    '\n' +
    '    node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1226:21:\n' +
    '\x1B[37m      1226 │         let result = \x1B[32m\x1B[37mawait callback({\n' +
    '           ╵                      \x1B[32m^\x1B[0m\n' +
    '\n' +
    '    at file:///Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/vike@0.4.228_react-streaming@0.4.2_react-dom@19.1.0_react@19.1.0__react@19.1.0__vite@6.3.2_@t_wojjma5dmi27atu7tq6adnipr4/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js:206:29\n' +
    '    at requestCallbacks.on-resolve (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1226:22)\n' +
    '    at handleRequest (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:647:11)\n' +
    '\n' +
    '  This error came from the "onResolve" callback registered here:\n' +
    '\n' +
    '    node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1150:20:\n' +
    '\x1B[37m      1150 │       let promise = \x1B[32m\x1B[37msetup({\n' +
    '           ╵                     \x1B[32m^\x1B[0m\n' +
    '\n' +
    '    at setup (file:///Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/vike@0.4.228_react-streaming@0.4.2_react-dom@19.1.0_react@19.1.0__react@19.1.0__vite@6.3.2_@t_wojjma5dmi27atu7tq6adnipr4/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js:106:23)\n' +
    '    at handlePlugins (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1150:21)\n' +
    '    at buildOrContextImpl (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:873:5)\n' +
    '    at Object.buildOrContext (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:699:5)\n' +
    '    at /Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:2029:15\n' +
    '    at new Promise (<anonymous>)\n' +
    '    at Object.build (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:2028:25)\n' +
    '    at build (/Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1879:51)\n' +
    '    at transpileWithEsbuild (file:///Users/nick/Workspace/portal/cms-frontend/node_modules/.pnpm/vike@0.4.228_react-streaming@0.4.2_react-dom@19.1.0_react@19.1.0__react@19.1.0__vite@6.3.2_@t_wojjma5dmi27atu7tq6adnipr4/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js:254:24)\n' +
    '\n' +
    '  The plugin "vike-esbuild" was triggered by this import\n' +
    '\n' +
    '    interface/+config.ts:1:20:\n' +
    '\x1B[37m      1 │ import favicon from \x1B[32m"@assets/favicon.ico"\x1B[37m;\n' +
    '        ╵                     \x1B[32m~~~~~~~~~~~~~~~~~~~~~\x1B[0m'
}

My other dependencies are:
✦3 ~> pnpm list
Legend: production dependency, optional only, dev only

/Users/nick/Workspace/portal/cms-frontend

dependencies:
@dnd-kit/core 6.3.1                 @highlight-run/node 3.12.1          @tsndr/cloudflare-worker-jwt 3.1.4  hono 4.7.7                          pino 9.6.0                          react-dom 19.1.0                    vike 0.4.228
@dnd-kit/sortable 10.0.0            @hono/node-server 1.14.1            @vitejs/plugin-react 4.4.1          kysely 0.28.1                       pprof 4.0.0                         react-toastify 11.0.5               vike-react 0.6.1
@dnd-kit/utilities 3.2.2            @supabase/ssr 0.6.1                 framer-motion 12.8.0                lucide-react 0.503.0                qrcode 1.5.4                        sqids 0.3.0
@highlight-run/hono 1.0.4           @supabase/supabase-js 2.49.4        highlight.run 9.16.0                path-to-regexp 8.2.0                react 19.1.0                        telefunc 0.2.5

devDependencies:
@eslint/js 9.25.1                            @types/node 22.14.1                          autoprefixer 10.4.21                         eslint-plugin-prettier 5.2.6                 kysely-supabase 0.2.0                        prettier 3.5.3                               typescript-eslint 8.31.0
@hono/vite-dev-server 0.19.0                 @types/pg 8.11.13                            cross-env 7.0.3                              eslint-plugin-react 7.37.5                   pg 8.15.5                                    tailwindcss 3.4.17                           vite 6.3.2
@playwright/test 1.52.0                      @types/react 19.1.2                          eslint 9.25.1                                eslint-plugin-unused-imports 4.1.4           pino-pretty 13.0.0                           tsx 4.19.3                                   vitest 3.1.2
@trivago/prettier-plugin-sort-imports 5.2.2  @types/react-dom 19.1.2                      eslint-config-prettier 10.1.2                globals 16.0.0                               postcss 8.5.3                                typescript 5.8.3

Let me know if you need any other info!

Duplicate issue #2329: Error during build
Created: 2025-04-02T03:31:04Z
Description
error during build:
Error: Build failed with 2 errors:
node_modules/vike/node_modules/esbuild/lib/main.js:1226:21: ERROR: [plugin: vike-esbuild] [vike@0.4.227][Bug] You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new?template=bug.yml and copy-paste this error. A maintainer will fix the bug (usually within 24 hours).
node_modules/vike/node_modules/esbuild/lib/main.js:1226:21: ERROR: [plugin: vike-esbuild] [vike@0.4.227][Bug] You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new?template=bug.yml and copy-paste this error. A maintainer will fix the bug (usually within 24 hours).
at failureErrorWithLog (/Users/alnoor/Code/n8n-workflow-directory-clean/node_modules/vike/node_modules/esbuild/lib/main.js:1476:15)
at /Users/alnoor/Code/n8n-workflow-directory-clean/node_modules/vike/node_modules/esbuild/lib/main.js:945:25
at runOnEndCallbacks (/Users/alnoor/Code/n8n-workflow-directory-clean/node_modules/vike/node_modules/esbuild/lib/main.js:1316:45)
at buildResponseToResult (/Users/alnoor/Code/n8n-workflow-directory-clean/node_modules/vike/node_modules/esbuild/lib/main.js:943:7)
at /Users/alnoor/Code/n8n-workflow-directory-clean/node_modules/vike/node_modules/esbuild/lib/main.js:970:16
at responseCallbacks. (/Users/alnoor/Code/n8n-workflow-directory-clean/node_modules/vike/node_modules/esbuild/lib/main.js:622:9)
at handleIncomingPacket (/Users/alnoor/Code/n8n-workflow-directory-clean/node_modules/vike/node_modules/esbuild/lib/main.js:677:12)
at Socket.readFromStdout (/Users/alnoor/Code/n8n-workflow-directory-clean/node_modules/vike/node_modules/esbuild/lib/main.js:600:7)
at Socket.emit (node:events:507:28)
at addChunk (node:internal/streams/readable:559:12)

Closing comment (2025-04-24T06:45:48Z): Possibly the same as #2410.