Workers - Node.js compatibility is now enabled by default
- Announced
- Effective
- Tags
- Workers
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-08-04-nodejs-compat-default/
<p>Workers now enable the <code>nodejs_compat</code> and <code>nodejs_compat_v2</code> compatibility flags by default for <a href="https://developers.cloudflare.com/workers/configuration/compatibility-dates/">compatibility dates</a> of <code>2026-08-04</code> or later. These flags are not used for these compatibility dates because the compatibility date enables the same behavior.</p> <p>This means all <a href="https://developers.cloudflare.com/workers/runtime-apis/nodejs/">Node.js built-in APIs</a> supported by the Workers runtime are available by default, including <code>node:crypto</code>, <code>node:buffer</code>, <code>node:stream</code>, <code>node:net</code>, <code>node:dns</code>, <code>node:fs</code>, <code>node:http</code>, and more. npm packages that depend on these APIs will work without additional configuration.</p> <p>Workers using an earlier compatibility date are not affected. They can still opt in by adding <code>nodejs_compat</code> to <code>compatibility_flags</code>.</p> <p>New projects do not need to add either flag. Existing projects can update their compatibility date without removing them. Wrangler, Miniflare, the Cloudflare Vite plugin, and Vitest Pool Workers ignore these redundant flags when starting the runtime.</p> <p>To turn off Node.js compatibility completely, remove any <code>nodejs_compat</code> and <code>nodejs_compat_v2</code> flags. Then add both of the following flags:</p> <div data-nb-tabs data-nb-sync-key="wranglerConfig" class><div class="relative flex border-b border-border" role="tablist" data-nb-tabs-list><span class="bg-primary pointer-events-none absolute -bottom-px h-0.5 rounded-t-sm transition-[left,width] duration-200 ease-out" data-nb-tabs-indicator aria-hidden="true"></span></div><div class="mt-3"><div role="tabpanel" data-nb-tabs-content data-nb-tab-label="wrangler.jsonc" class><figure class="nb-code-figure" data-nb-lang="jsonc"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="jsonc" data-nb-lang="jsonc"><code><span class="line"><span class="nb-shiki-140thh">{</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "$schema"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-mdbnqw">"./node_modules/wrangler/config-schema.json"</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-21nrsd"> // Set this to today's date</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "compatibility_date"</span><span class="nb-shiki-140thh">: </span><span class="nb-shiki-mdbnqw">"2026-10-25"</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-dzsirb"> "compatibility_flags"</span><span class="nb-shiki-140thh">: [</span></span> <span class="line"><span class="nb-shiki-mdbnqw"> "no_nodejs_compat"</span><span class="nb-shiki-140thh">,</span></span> <span class="line"><span class="nb-shiki-mdbnqw"> "no_nodejs_compat_v2"</span></span> <span class="line"><span class="nb-shiki-140thh"> ]</span></span> <span class="line"><span class="nb-shiki-140thh">}</span></span></code></pre></figure></div><div role="tabpanel" data-nb-tabs-content data-nb-tab-label="wrangler.toml" class><figure class="nb-code-figure" data-nb-lang="toml"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="toml" data-nb-lang="toml"><code><span class="line"><span class="nb-shiki-21nrsd"># Set this to today's date</span></span> <span class="line"><span class="nb-shiki-140thh">compatibility_date = </span><span class="nb-shiki-mdbnqw">"2026-10-25"</span></span> <span class="line"><span class="nb-shiki-140thh">compatibility_flags = [</span><span class="nb-shiki-mdbnqw">"no_nodejs_compat"</span><span class="nb-shiki-140thh">, </span><span class="nb-shiki-mdbnqw">"no_nodejs_compat_v2"</span><span class="nb-shiki-140thh">]</span></span></code></pre></figure></div></div></div><script type="module" src="https://developers.cloudflare.com/home/runner/work/cloudflare-docs/cloudflare-docs/src/components/ui/tabs/Tabs.astro?astro&type=script&index=0&lang.ts"></script> <p>For more information, refer to the <a href="https://developers.cloudflare.com/workers/runtime-apis/nodejs/">Node.js compatibility documentation</a>.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.