Closed bgins 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.
@bgins: thanks for reporting. js-ipfs maintainers are tied up currently. Is this something you could potentially take on? Contributions welcome.
Hey @BigLep! Thanks for the reply. I'm also tied up at the moment, but I think it should be possible to work around this issue with a bit of type casting:
const service = new IPFSService(ipfs) as unknown as MultiService<IPFSService>
If that doesn't work out, I'll revisit.
js-IPFS is in the process of being deprecated, the replacement is Helia - please see the State of IPFS in JS post for a bit of background and the migration guide for how to port your app over.
There's no direct replacement for the message port server yet, but something similar should be fairly easy to create.
Version:
ipfs
atv0.62.2
ipfs-core
atv0.14.2
ipfs-message-port-server
atv0.11.2
tsc
atv4.6.3
Platform: The bug is with the TypeScript types, so the most relevant platform is
tsc
atv4.6.3
Subsystem:
ipfs-message-port-server
Severity: High. Type error prevents compilation with TypeScript.
Description:
When instantiating a
Server
withipfs-message-port-server
, theIPFSService
is not assignable to theMultiService
type parameter. I expect the a server can be instantiated with a service configured with an IPFS instance created byipfs
oripfs-core
.Steps to reproduce the error:
In brief:
Minimal reproduction: https://github.com/bgins/ipfs-message-port-server-type-error
Error message: