transmute-industries / sidetree.js

Sidetree Core Protocol and DID Method Drivers
https://identity.foundation/sidetree/spec/
Apache License 2.0
51 stars 26 forks source link

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

Open ghost opened 1 year ago

ghost commented 1 year ago

BUG

The sidetree.js/package/dashboard is using the typescripts in which "duplex" is missing from RequestInit. This causes"TypeError: RequestInit: duplex option is required when sending a body."when it calls eth_getBlockByNumber of ganache-cli. I tried to fix it by that others had done in node#46221 but I got failed for there is no such a properties named "duplex" in typescript's lib. I want to know how to fix it.

environment

node v20.2.0 npm 9.6.7 WSL Ubuntu 22.04.2 LTS Ganache CLI v6.12.2 (ganache-core: 2.13.2)

detail


End batch writing. Duration: 11 ms.
Waiting for 1 seconds before writing another batch.
Fetching Sidetree transactions from blockchain service...
Fetched 0 Sidetree transactions from blockchain service in 4 ms.
Successfully kicked off downloading/processing of all new Sidetree transactions.
Processing previously unresolvable transactions if any...
Fetched 0 unresolvable transactions to retry in 1 ms.
Event emitted: sidetree_observer_loop_success
Waiting for 1 seconds before fetching and processing transactions again.
Start operation batch writing...
Unexpected and unhandled error during batch writing, investigate and fix:
TypeError: RequestInit: duplex option is required when sending a body.
    at Object.fetch (node:internal/deps/undici/undici:11522:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)