-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Version 1.1.3 fails in browser - Buffer is not defined #20
Comments
how are you building it, are you building it in an enviroment like browserify or webpack that adds node globals ? |
With a bit more investigation it looks like the issue could be that we are using Webpack with a target of If the |
I am getting a similar error trying to use it with aws-amplify-react-native. Cant find variable: Buffer in make-hash.js |
Seems it is a problem when using it in a not CommonJS context (such react-native). In this cases, you cannot use native nodejs modules. For me, it worked (react-native)
|
Using AWS congnito, I've encountered this error after upgrade to angular and CLI v6. Still don't know how to solve that. |
In case anyone is having that problem after upgrading to Angular 6 and using cognito, I've written a SO answer that might help: https://stackoverflow.com/a/50377270/2398593 |
Of note, the current alpha of https://github.com/webpack/changelog-v5/blob/master/README.md#automatic-nodejs-polyfills-removed
|
We wanted to use the package to create hashes in Chrome, but on initial testing it seems like this package doesn't work in the browser.
When attempting to import the package it fails with the error message:
You can see an minimal example in this Code Sandbox:
https://codesandbox.io/s/x2xyrq2plp
The text was updated successfully, but these errors were encountered: