Cloudflare Worker + Astro Deployment Issue

Running into an issue with deploying static assets in my Cloudflare Worker project using Astro. The deployment command (npm run deploy) that was working fine yesterday is now throwing this error:

const readdirp_1 = require("readdirp");
                   ^
Error [ERR_REQUIRE_ESM]: require() of ES Module


Seems like there might be a dependency conflict with ESM/CommonJS modules. Has anyone run into this recently or knows a workaround? Any help appreciated!
Was this page helpful?