ssbc / ssb-keys

keyfile operations for ssb
36 stars 26 forks source link

can't work in browser ? #57

Closed helxsz closed 5 years ago

helxsz commented 5 years ago

I am playing ssb-keys on the browser along with angular stack, but both ssb-keys and private-box depends on chloride library, and chloride library can not work on the browser.

how would i make it work

ahdinosaur commented 5 years ago

chloride library can not work on the browser.

hi @helxsz, chloride should be able to work in the browser, can you post the error you're seeing?

ahdinosaur commented 5 years ago

but it might be that chloride doesn't work in the browser unless you're using browserify, i could see some possible awkwardness with other bundlers from how chloride/index.js does the browser loading.

helxsz commented 5 years ago

yes, my wrong, chloride does work. What doesn't work is node-gyp-build.

That is the error

ERROR in ./node_modules/node-gyp-build/index.js
Module not found: Error: Can't resolve 'fs' in '/projects/insta/instagram/node_modules/node-gyp-build'

As i investigated that angular doesn't support fs anymore, I wondered any way around?

ahdinosaur commented 5 years ago

@helxsz: let's move this discussion to https://github.com/dominictarr/chloride/issues/12, i also made a pull request that might help: https://github.com/dominictarr/chloride/pull/13

dominictarr commented 5 years ago

@helxsz what command are you running that produces that error?

helxsz commented 5 years ago

@ahdinosaur @dominictarr the new pull request works out directly, thanks for the work !!