Closed keks closed 1 year ago
Oh and I depend on version ^10.0.1
Hi @keks! In the NPM distribution some exports have been moved to earthstar/browser
and earthstar/node
. I realise the docs don't mention this, so apologies!
import * as Earthstar from "earthstar";
import { ReplicaDriverWeb } from "earthstar/browser";
Let me know if that helps.
You're right about ReplicaDriverWeb
being missing from the API docs. It's because those docs are generated from the Deno entrypoint, which doesn't export it. Seems I need to add links for the browser and Node entrypoints to the website too.
As the README has been updated and the website now lists APIs for all environments on the website, I'd like to think it'd be harder for some to get into the same situation as you did.
What's the problem you want solved?
I noticed that ReplicaDriverWeb is not accessible from my setup. It also doesn't show up in the API docs.
I use npm with webpack. It's very small, no fancy build scripts. I import earthstar using
and that works and most functionality is there, but ReplicaDriverWeb isn't.
When using it from a simple js file with type=module and the cdn import it worked fine. No idea what the cause is, I don't know JS/TS tooling very well.
Is there a solution you'd like to recommend?
Sorry, no.