Cloudflare · infra · fg-0218

Worker build fails to resolve node:crypto or node:buffer even though Workers support Node APIs

If you see No such module "node:crypto", the cause and the fix for Cloudflare are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
No such module "node:crypto".Wrangler build says the package wasn't found on the file system but is built into nodeA dependency that imports node:stream breaks the deploy
Cause
Node.js built ins are only available when the nodejs_compat flag is on. It became a default only for compatibility dates of 2026-08-04 or later, so Workers with older dates must add the flag by hand.
Fix
Add nodejs_compat to compatibility_flags, or move compatibility_date to 2026-08-04 or later after testing other date gated changes.
Apply
# wrangler.toml compatibility_date = "2025-09-01" compatibility_flags = ["nodejs_compat"]
Affected
Workers with compatibility_date before 2026-08-04 and no nodejs_compat flag
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun