-
Notifications
You must be signed in to change notification settings - Fork 23
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
Buffer is not defined #5
Comments
@franleplant Yo! I just ran into this issue as well, and I'm trying to bring it in with various babel global plugins with no luck so far. Have you arrived at an answer yet? |
Hey @franleplant I got this error to go away just by requiring my globals.js file in the file where I register the app. globals.js has this in it:
You can see a working example here: https://github.com/wswoodruff/strangeluv-native/blob/master/src/index.js#L6 If you have other issues, I ran into problems with crypto.pbkdf2Sync, and made a temporary shim for it until someone comes up with a better solution. You can see #6 and https://github.com/mvayngrib/react-native-crypto/issues/14#issuecomment-306072211 for more info. Please let me know if you get it working! |
Hey @wswoodruff thank you so much for your contribution. Im not actively working on React Native at the moment and I don't have a dev env for it so I'm not going to be testing this soon, but it's great to have this sort of experience documented for future users (even our future selves). So thank you! |
Was having the same issue, this combined with #4 was exactly what I needed, thank you so much @wswoodruff @franleplant @philikon @parshap |
Following all the same tools and tactics however I am unable to over this error. It looks like Buffer isn't in the global scope for some reason. Getting |
use this package https://www.npmjs.com/package/react-zlib-js and |
Hi! Thanks a lot for your work.
I've followed the guides but I cannot seem to pass the globals error:
I did add the
globals.js
and import it from my codeIf I change the order of the
globals
import, I get something like:In any case, I thought i would be nice to at least contribute in this way to your work.
Im actively trying other alternatives to make
mqtt
work with React NativeThe text was updated successfully, but these errors were encountered: