-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)6-betaIssues affects the beta of Astro 6Issues affects the beta of Astro 6pkg: cloudflareRelated to the Cloudflare adapterRelated to the Cloudflare adapter
Description
Astro Info
Astro v6.0.0-beta.3
Vite v7.3.1
Node v24.13.0
System Linux (x64)
Package Manager npm
Output static
Adapter @astrojs/cloudflare (v13.0.0-beta.1)
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
A newly created project using the current beta of Astro and the Cloudflare adapter, upgraded to current v6 beta releases, throws an error in the browser when there is an <Image> component on a page, in astro dev mode only (build + preview works correctly.)
Steps to reproduce
- Clone the reproduction repository below
- Run
pnpm install - Run
pnpm run dev - Open
http://localhost:4321in your browser
Actual result
Error:
The file does not exist at "[PATH TO PROJECT]/node_modules/.vite/deps_ssr/chunk-BB2NZPL6.js?v=c17d9a8e" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
at CustomModuleRunner.cachedModule (workers/runner-worker.js:1196:20)
at request (workers/runner-worker.js:1123:83)
at null.<anonymous> (/home/ndc/projects/astro-cloudflare-image-repro/node_modules/.vite/deps_ssr/chunk-FCOL542Q.js:1:1)
at Object.runInlinedModule (workers/runner-worker.js:1314:4)
at CustomModuleRunner.directRequest (workers/runner-worker.js:1166:59)
at CustomModuleRunner.cachedRequest (workers/runner-worker.js:1084:73)
at null.<anonymous> (/home/ndc/projects/astro-cloudflare-image-repro/node_modules/.vite/deps_ssr/chunk-HKIE33OW.js:1:1)
at Object.runInlinedModule (workers/runner-worker.js:1314:4)
at CustomModuleRunner.directRequest (workers/runner-worker.js:1166:59)
at CustomModuleRunner.cachedRequest (workers/runner-worker.js:1084:73)
What's the expected result?
You should see an image in the browser.
Additional notes
Building the project with
pnpm run build
pnpm run preview
Does NOT manifest the error (the page with the image is shown correctly.)
Apologies for the GitHub repro, as with #15194 I couldn't get workerd to run in stackblitz.
Link to Minimal Reproducible Example
https://github.com/n3dst4/astro-cloudflare-image-repro
Participation
- I am willing to submit a pull request for this issue.
twodft
Metadata
Metadata
Assignees
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)6-betaIssues affects the beta of Astro 6Issues affects the beta of Astro 6pkg: cloudflareRelated to the Cloudflare adapterRelated to the Cloudflare adapter