No such module "node:buffer". imported from "worker.js"

Hello. I'm trying to deploy basic-auth worker - https://developers.cloudflare.com/workers/examples/basic-auth/ but I'm getting following error:
Uncaught Error: No such module "node:buffer". imported from "worker.js" (Code: 10021)
Uncaught Error: No such module "node:buffer". imported from "worker.js" (Code: 10021)
when I click "Save and deploy". I have worker.js file (content as in docs) and wrangler.toml file with compatibility_flags (content below). Do you have any idea how can I fix this?
compatibility_flags = [ "nodejs_compat" ]
compatibility_flags = [ "nodejs_compat" ]
Cloudflare Docs
HTTP Basic Authentication · Cloudflare Workers docs
Documentation for Cloudflare Workers, a serverless execution environment that allows you to create entirely new applications or augment existing ones …
1 Reply
kian
kian8mo ago
Sounds like you’re using Quick Edit in the dashboard? Wrangler.toml doesn’t work there.
Want results from more Discord servers?
Add your server