Closed revolunet closed 1 year ago
Ok i had to specify a "data" directory :
SSB.init("./data");
now i get :
Uncaught Error: ssb-tunnel is configured, but a portal is missing
at Object.server (index.js:83)
at Object.server (compose.js:96)
at index.js:45
at Array.map (<anonymous>)
at Object.server (index.js:44)
at setupMultiserver (core.js:167)
at run (setImmediate.js:40)
at runIfPresent (setImmediate.js:69)
at onGlobalMessage (setImmediate.js:109)
Looks like you are loading ssb-browser-core directly instead of using the bundle?
There are some patches that needs to be applied if running directly from source: https://github.com/arj03/ssb-browser-core#building
With import SSB from "ssb-browser-core/dist/bundle-core";
i get TypeError: s.existsSync is not a function
Yeah SSB browser core is not a ES module.
See https://github.com/arj03/ssb-browser-core#api.
Dist is created using browserify and has polyfills for all the fs stuff.
Happy to ideas on how to improve the README for your use case :)
even with const SSB = require("ssb-browser-core/dist/bundle-core");
i get the same error
You hit that error if you run the browserify code from node instead of in the browser. It's a bit unfortunate with the patches. I should create branches for all of them and use that, so that you can just include the project directly as you did in the second post. To be honest it took quite a while to fix everything to work in the browser and it takes time for things to be applied upstream.
sorry i dont understand what's going on :/ i require the "bundle-core" with webpack and this error appear in the browser.
when inspecting this bundle-core i can see the patchs are already applied, for example :
crypto_auth:function(){},crypto_auth_verify:function(){},crypto_box_easy:function(){},crypto_box_keypair:function(){},crypto_box_open_easy:function(){}
Closing this one, this is a webpack example in repo and the old patches are long since merged.
Hi, i'm trying to use ssb-browser-core and bundle with webpack; i had to disable
fs
andnet
bundling for the browser for it to loadWhat are the first steps to setup the connexion ?
I'm trying this :
But i get :