uploading to ipfs

TypeError: RequestInit: duplex option is required when sending a body.

Hey welcome to our community! What are you trying to do here, and what’s going wrong? From your post, I can’t help as there’s not enough information.

okay, I am trying to upload metadata to an image on ipfs and it kept on throwing this error at the ipfs.add function when i run the script.

try {
const result = await ipfs.add(metadata,{duplex: true})
console.log(result);
} catch (e) {
console.log(e)
}