Closed Raman-Raje closed 1 year ago
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
Finally, remember to use https://discuss.ipfs.io if you just need general support.
I am seeing the same problem. I tried a bunch of old versions, and they all seem to do the same thing. Here's the code:
import { create } from 'ipfs-http-client'
const ipfs = create({ url: '/ip4/127.0.0.1/tcp/5001' })
const { cid } = await ipfs.add('Hello world!')
console.log(cid)
And here's the output:
> node root.js
node:internal/deps/undici/undici:14062
Error.captureStackTrace(err, this);
^
TypeError: RequestInit: duplex option is required when sending a body.
at Object.fetch (node:internal/deps/undici/undici:14062:11)
at async Client.fetch (/home/crow/Repos/src/node_modules/ipfs-utils/src/http.js:132:22)
at async addAll (file:///home/crow/Repos/src/node_modules/ipfs-http-client/src/add-all.js:36:17)
at async last (file:///home/crow/Repos/src/node_modules/it-last/dist/src/index.js:7:22)
at async Object.add (file:///home/crow/Repos/src/node_modules/ipfs-http-client/src/add.js:22:14)
at async file:///home/crow/Repos/src/root.js:10:17
Node.js v19.3.0
any update for this issue
I have found the solution. In my case, my node version got updated. Reverted it back to V16. Its working fine for me
What version node are you on? I'm hitting this error on 16.17.1
I am on V16.15.1. Try This one. Best Luck
I am switch to v18.12.1
and it works fine
^ditto.. I didnt specify my node version past 18.x.x when deploying to heroku where they had recently changed default from 18.12 -> 18.13 which seems to break ipfs-https-client
I believe its resolved now. Closing the issue
I believe its resolved now. Closing the issue
The problem is still happening:
TypeError: RequestInit: duplex option is required when sending a body.
NodeJS v18.15.0 IPFS (Kubo) v0.19.1 Windows 10
TypeError: RequestInit: duplex option is required when sending a body.
This issue is still happening. Please how can I resolve it?
Hi, I was working with ipfs-http-client version ^59.0.0. Everything was working fine, and I did some updates through brew, and Node got updated to V19. Previously I was on V18.13.0
Now the code is giving above mentioned error while performing ipfs.add operation. For other ipfs operations, everything is working fine. I did downgrade to node V18.13.0, but the issue is still there. I am not sure what wrong i am doing.
I am using Mac OS. Here is the code to reproduce the issue...
Here is the error log :-