Uncaught Error: No such module " node:buffe
When I try to create a worker according to https://developers.cloudflare.com/workers/examples/signing-requests/ ,I get "Uncaught Error: No such module " node:buffer". imported from "worker.js" (Code: 10021)".
Cloudflare Docs
Sign requests · Cloudflare Workers docs
This example Worker makes use of the Node.js Buffer API, which is available as part of the Worker’s runtime Node.js compatibility mode. To run this …
4 Replies
GitHub
🐛 BUG: Error while importing node:buffer · Issue #6264 · cloudflare...
Which Cloudflare product(s) does this pertain to? Workers for Platforms What version(s) of the tool(s) are you using? . What version of Node are you using? No response What operating system and ver...
I have added "compatibility_flags = [ "nodejs_als" ]" to wrangler.toml as per instructions.
for buffer it should be
nodejs_compat
, not nodejs_als
wrangler.toml : compatibility_flags = ["nodejs_compat"]