Open torgeadelin opened 1 year ago
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.
I've already provided a codesandbox, does that not work? Here's the link again https://codesandbox.io/p/sandbox/flamboyant-kowalevski-cmgymq @ShubhamChaturvedi7
@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: