Buil fail
I'm encountering issues building my Astro application, which uses Svelte for components and Supabase for the database. The application is hosted on Cloudflare Workers. While local development is working fine, the build process on Cloudflare is failing.
The root of the problem seems to be the micromatch module. I'm getting an error related to micromatch during the build process. I've exhausted the suggestions provided by AI assistants like ChatGPT, Gemini, and Copilot, but none have resolved the issue.
Can anyone help? I would be very grateful.
1 Reply
micromatch dependency is trying to use a nodejs api.
Your best bet is enabling node compat - https://developers.cloudflare.com/workers/runtime-apis/nodejs/
If it's still not working (using APIs not supported yet) then your best bet is finding another package
Cloudflare Docs
Node.js compatibility | Cloudflare Workers docs
Implemented Node.js runtime APIs and enablement instructions for your Worker project.