Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot be used in "react native", will appear ”Unable to resolve module stream” and “can't find variable Buffer” #18

Open
XJH0415 opened this issue Apr 8, 2018 · 3 comments
Labels

Comments

@XJH0415
Copy link

XJH0415 commented Apr 8, 2018

I'm working on a phone app to make "bitshares" available on the phone, but when I execute "npm install bitsharesjs," the program crashes every time I use "import {PublicKey} from / bitbitshares / s / es'".I think it may be that the "react native" running environment is inconsistent with the browser, resulting in incompatibility, which is my personal view, I hope the author can answer my question, thank you very much.

@lesharadkovich
Copy link

Any update here?

@Momtntu
Copy link

Momtntu commented Aug 26, 2018

@XJH0415 Same Question as @lesharadkovich 's.

@CSeanXu
Copy link

CSeanXu commented Aug 26, 2018

@XJH0415 @lesharadkovich

The reason:

Buffer is a core node module which bitsharesjs depends on.

Solution:

npm install rn-nodeify

./node_modules/.bin/rn-nodeify --install --hack

Reference:

  1. Receiving "Can't find variable: Buffer" bitcoinjs/bitcoinjs-lib#559
  2. https://github.com/tradle/rn-nodeify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants