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
Gary Chan
Gary ChanOP5mo ago
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...
Gary Chan
Gary ChanOP5mo ago
I have added "compatibility_flags = [ "nodejs_als" ]" to wrangler.toml as per instructions.
Erisa
Erisa5mo ago
for buffer it should be nodejs_compat, not nodejs_als
akazwz
akazwz5mo ago
wrangler.toml : compatibility_flags = ["nodejs_compat"]
Want results from more Discord servers?
Add your server