You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the library doesn't really work with Vite? I'm trying to a setup encryption decryption class in one of my apps, and I'm getting weird errors in the browser after initialising the code.
Locally I'm getting
build_cryptographic_materials_cache_key_helpers.ts:15 Uncaught TypeError: Buffer.alloc is not a function
at build_cryptographic_materials_cache_key_helpers.ts:15:28
(anonymous) @ build_cryptographic_materials_cache_key_helpers.ts:15
Both errors are linked to using Node packages inside the Browser context (which doesn't work). I think some of the dependencies of this package import those and thus it fails.
Hi torgeadelin,
We don't explicitly support Vite. But if you can give us the bare minimum setup of your code repo (a Zip file perhaps) required to reproduce the error along with instructions, we can try to check if the issue is on our end.
@torgeadelin
We would be willing to look at Zip with instructions to reproduce the error.
No one on the team is familiar with CodeSandbox,
and we would rather use our normal tooling to debug the issue.
(I tried to download the repo from CodeSandbox,
but the download to Zip UI kept crashing/failed
to download anything.)
Problem:
It seems that the library doesn't really work with Vite? I'm trying to a setup encryption decryption class in one of my apps, and I'm getting weird errors in the browser after initialising the code.
Locally I'm getting
I've also tried creating a Codesandbox to quickly reproduce the issue: https://codesandbox.io/p/sandbox/flamboyant-kowalevski-cmgymq
But it seems we're getting a different error.
Both errors are linked to using Node packages inside the Browser context (which doesn't work). I think some of the dependencies of this package import those and thus it fails.
Solution:
I'm not sure
Out of scope:
Someone else had this issue but posted the issue in the wrong place: https://crypto.stackexchange.com/questions/106579/issue-with-aws-encryption-sdk-for-javascript-in-browser-buffer-is-not-defined
Local project details:
The text was updated successfully, but these errors were encountered: