-
Notifications
You must be signed in to change notification settings - Fork 105
Troubleshooting
If you don't see the problem you're running into here, please post questions at https://discuss.ipfs.tech/c/help/helia/40. If you have found a bug, please open an issue.
⏰ I'm seeing a lot of errors in my browser console when using Helia. How can we catch and handle these errors?
Unfortunately, some network transport errors cannot be caught in the browser. This is currently true for
- WebSocketsSecure - (no current tracking issue)
- WebTransport - https://github.com/ipfs/in-web-browsers/issues/211, https://bugs.chromium.org/p/chromium/issues/detail?id=1473980
Please see https://github.com/ipfs/helia/issues/151#issuecomment-1613511585 for a more detailed explanation.
We have spent much time debugging and troubleshooting various connectivity issues with js-libp2p and Helia documented at https://github.com/ipfs/helia/issues/182. Please follow that tracking issue for further information and updates on improvements in this space.
Helia is a pure ESM module, and not CJS so you cannot require
it, instead you must use import
.
Note that if you are using TypeScript or some other transpiler, you must configure it to export ESM - if the export format is CJS it will not work.
If this is not possible, you can use dynamic imports to load ESM code from CJS - for an example see https://github.com/ipfs-examples/helia-examples/tree/main/examples/helia-cjs?rgh-link-date=2024-01-04T18%3A31%3A57Z#usage