🐛 BUG: wrangler pages dev
not working with astro <Image />
component in hybrid
output mode
#5824
Labels
bug
Something that isn't working
Which Cloudflare product(s) does this pertain to?
Pages, Wrangler core
What version(s) of the tool(s) are you using?
3.55.0 [wrangler], 4.8.3 [astro], 10.2.6 [@astrojs/cloudflare]
What version of Node are you using?
20.11.1
What operating system and version are you using?
macOS Sonoma 14.2.1
Describe the Bug
Steps to reproduce
npm create cloudflare@latest cloudflare-astro -- --framework=astro
.astro.config.mjs
:src/pages/index.astro
:src/assets/image.jpg
.npm preview
.This should build the project and then execute
wrangler pages dev
.Expected behavior
There should be no errors, as everything works as expected when deploying to Cloudflare Pages.
Observed behavior
wrangler pages dev
fails with the errors below.node_modules/detect-libc
is a dependency of thesharp
library to optimize the images on build. Withoutput: "hybrid"
andimageService: "compile"
the images are only optimaized for the static pages at build time and thesharp
library is never used in SSR.Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
✘ [ERROR] Could not resolve "child_process"
The package "child_process" wasn't found on the file system but is built into node.
Add "node_compat = true" to your wrangler.toml file and make sure to prefix the module name with "node:" to enable Node.js compatibility.
✘ [ERROR] Could not resolve "fs"
The package "fs" wasn't found on the file system but is built into node.
Add "node_compat = true" to your wrangler.toml file and make sure to prefix the module name with "node:" to enable Node.js compatibility.
The text was updated successfully, but these errors were encountered: