Archived Notes

An archive of what used to be my /notes page. Node.js: Buffer in Cloudflare Workers Using things like Buffer.from() in a Cloudflare Worker will result in an undefined error. To make it work, the nodejs_compat flag has to be enabled in the worker configuration file (in the compatibility_flags array). When that’s done, Buffer can be used: import { Buffer } from 'node:buffer' globalThis . Buffer =…