Dynamic require of "node:buffer" is not supported

Hey All! Trying to follow along with the dev doc guide on browser rendering within workers. However I am getting an error when attempting to dev test or deploy.
notes: [
{
text: 'Uncaught Error: Dynamic require of "node:buffer" is not supported\n' +
' at worker.js:13:11\n' +
' at worker.js:944:28\n' +
' at worker.js:14327:3\n' +
' [code: 10021]'
}
],
notes: [
{
text: 'Uncaught Error: Dynamic require of "node:buffer" is not supported\n' +
' at worker.js:13:11\n' +
' at worker.js:944:28\n' +
' at worker.js:14327:3\n' +
' [code: 10021]'
}
],
import puppeteer from "@cloudflare/puppeteer";
import { Buffer } from 'node:buffer';
globalThis.Buffer = Buffer;
import puppeteer from "@cloudflare/puppeteer";
import { Buffer } from 'node:buffer';
globalThis.Buffer = Buffer;
main = "src/index.js"
compatibility_date = "2023-03-14"
compatibility_flags = [ "nodejs_compat" ]

browser = { binding = "MYBROWSER" }
main = "src/index.js"
compatibility_date = "2023-03-14"
compatibility_flags = [ "nodejs_compat" ]

browser = { binding = "MYBROWSER" }
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server