Open gnemanja opened 2 months ago
Thanks for the feedback! I can't reproduce this issue in React app. I will try to reproduce this in qwik if I can, may I know if there's any certain version of qwik you are using?
We are currently on 1.5.6, but I am pretty sure you can use the latest stable as well :) Thanks :)
running into this as well. Any work around @gnemanja ?
Seems like this is a vite misconfiguration issue: https://github.com/vitejs/vite/issues/7821 you need to specify node builtin modules in your vite config otherwise it'll try to bundle them throwing those errors
Checkboxes for prior research
Describe the bug
An error is thrown during build when using "import { defaultProvider } from '@aws-sdk/credential-provider-node';". Error:
node_modules/@smithy/shared-ini-file-loader/dist-es/getHomeDir.js (2:9): "sep" is not exported by "__vite-browser-external", imported by "node_modules/@smithy/shared-ini-file-loader/dist-es/getHomeDir.js".
SDK version number
@aws-sdk/credential-provider-node@latest
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
Node version: v21.4.0; We are using QWIK which is similar to React
Reproduction Steps
Observed Behavior
Expected Behavior
Successful build
Possible Solution
No response
Additional Information/Context
I tried many solutions for similar problems found on your Github, but they didn't work. The only solution that did anything was including node vite polyfills plugin, but it gives another issue:
node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js (7:9): "slurpFile" is not exported by "__vite-browser-external", imported by "node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js".