Cloudflare · infra · fg-0218

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

No such module "node:crypto".

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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"]

Affects: Workers with compatibility_date before 2026-08-04 and no nodejs_compat flag

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp