Skip to content

service core:user:my-react-app: Uncaught Error: No such module #10064

@brillout

Description

@brillout

What versions & operating system are you using?

System:
OS: Linux 6.8 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 2.70 GB / 7.52 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
npmPackages:
@cloudflare/vite-plugin: https://pkg.pr.new/@cloudflare/vite-plugin@31c94b7 => 1.9.5
wrangler: https://pkg.pr.new/wrangler@31c94b7 => 4.24.4

Please provide a link to a minimal reproduction

https://github.com/brillout/repro_vite-plugin-cloudflare_no-such-module

Describe the Bug

An unexpected error is thrown:

service core:user:my-react-app: Uncaught Error: No such module "dist/server/chunks/chunk-DgBTj3OE.js".
  imported from "dist/server/entries/pages_about.mjs"

MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
    at _Miniflare.#assembleAndUpdateConfig (/home/rom/tmp/repro_vite-plugin-cloudflare_no-such-module/node_modules/.pnpm/miniflare@https+++pkg.pr.new+cloudflare+workers-sdk+miniflare@31c94b7/node_modules/miniflare/src/index.ts:2028:10)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Mutex.runWith (/home/rom/tmp/repro_vite-plugin-cloudflare_no-such-module/node_modules/.pnpm/miniflare@https+++pkg.pr.new+cloudflare+workers-sdk+miniflare@31c94b7/node_modules/miniflare/src/workers/shared/sync.ts:66:45)

The file dist/server/chunks/chunk-DgBTj3OE.js does exist and the import path inside dist/server/entries/pages_about.mjs is correct.

See reproduction.

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting reporter responseNeeds clarification or followup from OPbugSomething that isn't workingvite-pluginRelating to the `@cloudflare/vite-plugin` package

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions