arj03 / ssb-browser-core

ssb-server in a browser
Other
50 stars 8 forks source link

path.parse is not a function #48

Closed nichoth closed 3 years ago

nichoth commented 3 years ago

image

This is from jitdb line 87 … i don't understand it. When i log path, it doesn't have parse indeed, but it is in the docs.

Was in my demo here -- https://github.com/nichoth/ssb-browser-demo/blob/main/src/index.js

I opened another browser in a private window (different public key) and followed the second browser by publishing a message like

{
    type: 'contact',
    contact: userId,
    following: true 
}

Ever since publishing that message it started throwing that error

arj03 commented 3 years ago

path should have been taken care of by path-browserify. Not exactly sure what your setup is, but that should be the problem.

nichoth commented 3 years ago

yes it's perplexing

the build process is just a simple browserify script

"build": "browserify -p esmify --debug ./src/index.js > public/bundle.js",
nichoth commented 3 years ago

It turns out it was my dependency budo that was causing the error because it was using an outdated version of browserify. So i replaced it with my own fork

    "budo": "https://github.com/nichoth/budo.git",

thanks

arj03 commented 3 years ago

Great you found it :)