Cloudflare Workers:2026-08-04 起 Node.js 兼容默认启用
Workers - Node.js compatibility is now enabled by default
Workers 用户注意:8 月 4 日起 Node.js 兼容默认开启,新项目无需配置即可用 node: 系列 API;老项目想关闭需显式加 no_nodejs_compat 标志,建议按需调整。
Workers now enable the nodejs_compat and nodejs_compat_v2 compatibility flags by default for compatibility dates of 2026-08-04 or later. These flags are not used for these compatibility dates because the compatibility date enables the same behavior.
This means all Node.js built-in APIs supported by the Workers runtime are available by default, including node:crypto, node:buffer, node:stream, node:net, node:dns, node:fs, node:http, and more. npm packages that depend on these APIs will work without additional configuration.
Workers using an earlier compatibility date are not affected. They can still opt in by adding nodejs_compat to compatibility_flags.
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.
To turn off Node.js compatibility completely, remove any nodejs_compat and nodejs_compat_v2 flags. Then add both of the following flags:
{
"$schema": "./node_modules/wrangler/config-schema.json",
// Set this to today's date
"compatibility_date": "2026-08-12",
"compatibility_flags": [
"no_nodejs_compat",
"no_nodejs_compat_v2"
]
}# Set this to today's date
compatibility_date = "2026-08-12"
compatibility_flags = ["no_nodejs_compat", "no_nodejs_compat_v2"]For more information, refer to the Node.js compatibility documentation.
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力