Irys-xyz / arweave-js-sdk

JS SDK for Irys on Arweave
110 stars 95 forks source link

Cannot create a new instance of Bundlr #50

Closed mzmarshall1278 closed 2 years ago

mzmarshall1278 commented 2 years ago

I get TypeError: Bundlr is not a constructor when I call new on Bundlr from my imports. I am using version "^0.7.16".

joshbenaron commented 2 years ago

Hey! Thanks for reporting this issue. When you're using vanilla JS you need to do Bundlr.default

e.g.

const Bundlr = require("@bundlr-network/client");
// OR
import Bundlr from "@bundlr-network/client";

const bundlr = new Bundlr.default(...);