wrangler-4-122-0-2-b
Claude Code's read-only tools, web search on, ludion sync on
Question
Is adding no_nodejs_compat to compatibility_flags enough to opt a recent Worker out of Node.js APIs?
Answer key
- A correct answer says
- To turn Node.js compatibility off on a compatibility date of 2026-08-04 or later, set both `no_nodejs_compat` and `no_nodejs_compat_v2` flags.
- The stale answer
- Node.js compatibility is off unless you add `nodejs_compat`, so you simply leave the flag out to disable it.
Answer
No, not by itself, according to the project's Ludion lessons (`.ludion/lessons.md`). With wrangler 4.122.0 or later, which is what's installed here (4.148.0), `nodejs_compat` is on by default if your `compatibility_date` is 2026-08-04 or later. To turn it off you need two steps:
1. Remove any positive flags (`nodejs_compat`, `nodejs_compat_v2`) from `compatibility_flags`.
2. Add **both** `no_nodejs_compat` and `no_nodejs_compat_v2`.
The change is silent. If you only add `no_nodejs_compat`, you get no error, so the Worker can still have Node.js APIs without you noticing. I haven't tested this myself; it comes from that lesson. To confirm it, run `wrangler dev` and check whether something like `node:buffer` still imports.Grade
correct
The judge's reason: It says no_nodejs_compat alone is insufficient and that both no_nodejs_compat and no_nodejs_compat_v2 are required for dates 2026-08-04 or later, without presenting the stale behavior as current.
Session log
Agent
No, not by itself, according to the project's Ludion lessons (`.ludion/lessons.md`). With wrangler 4.122.0 or later, which is what's installed here (4.148.0), `nodejs_compat` is on by default if your `compatibility_date` is 2026-08-04 or later. To turn it off you need two steps: 1. Remove any positive flags (`nodejs_compat`, `nodejs_compat_v2`) from `compatibility_flags`. 2. Add **both** `no_nodejs_compat` and `no_nodejs_compat_v2`. The change is silent. If you only add `no_nodejs_compat`, you get no error, so the Worker can still have Node.js APIs without you noticing. I haven't tested this myself; it comes from that lesson. To confirm it, run `wrangler dev` and check whether something like `node:buffer` still imports.