ReferenceError: Blob is not defined in JavaScript



The "Blob is not defined" error occurs when the Blob class is used without being imported in a Node.js application

 

import {Blob} from 'buffer';

const blob = new Blob(['hello world']);
console.log(blob); 

 

let buffer = Buffer.from(arraybuffer);
let arraybuffer = Uint8Array.from(buffer).buffer;

Tags:

Share:

Related posts