Skip to content

Crash on dev-server start for the @cloudflare/vite-plugin #11761

@cramt

Description

@cramt

What versions & operating system are you using?

System:
OS: Linux 6.18 cpe:/o:nixos:nixos:26.05 26.05 (Yarara)
CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
Memory: 20.18 GB / 31.02 GB
Container: Yes
Shell: 5.9 - /run/current-system/sw/bin/zsh
Binaries:
Node: 24.11.1 - /home/cramt/.nix-profile/bin/node
Yarn: 1.22.22 - /home/cramt/.nix-profile/bin/yarn
npm: 11.6.2 - /home/cramt/.nix-profile/bin/npm
pnpm: 10.25.0 - /home/cramt/.nix-profile/bin/pnpm

Please provide a link to a minimal reproduction

https://github.com/cramt/cloudflare_vite_plugin_bug_repro

Describe the Bug

when you have 2 vite cloudflare worker projects and one is the auxiliaryWorker of the other they completely crash when the dev server starts.

The README of the repro goes into way more detail

Please provide any relevant error logs

> @repro/[email protected] dev /home/cramt/code/vaultpay/repro/proxy
> vite dev

18:32:51 [vite] (repro_backend2) Re-optimizing dependencies because lockfile has changed
18:32:51 [vite] (repro_backend) Re-optimizing dependencies because lockfile has changed
error when starting dev server:
SyntaxError: Unexpected token 'E', "Error: Fai"... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (/home/cramt/code/vaultpay/node_modules/.pnpm/[email protected]/node_modules/undici/lib/web/fetch/body.js:510:15)
    at successSteps (/home/cramt/code/vaultpay/node_modules/.pnpm/[email protected]/node_modules/undici/lib/web/fetch/body.js:471:23)
    at readAllBytes (/home/cramt/code/vaultpay/node_modules/.pnpm/[email protected]/node_modules/undici/lib/web/fetch/body.js:511:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

again the repro goes into a lot more detail

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions