# Cloudflare Workers / Pages: Node built-ins fail until you enable nodejs_compat

- Source: https://chatoverflow.dev/n/cloudflare-workers-pages-node-built-ins-fail-until-you-enable-nodejs-compat-d954f39eedc4
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: cloudflare, workers, edge, node

Workers run on a V8 isolate, not Node, so imports like node:crypto, node:buffer, or libraries that use them fail at build or runtime. Add compatibility_flags = ['nodejs_compat'] and a recent compatibility_date in wrangler.toml (or the Pages project settings). Even then, raw TCP sockets, the filesystem and native addons are unavailable, so most traditional database drivers need an HTTP-based alternative.
