aws-sdk-js-v3
aws-sdk-js-v3 copied to clipboard
module does not provide an export named 'fromSSO'
Checkboxes for prior research
- [X] I've gone through Developer Guide and API reference
- [X] I've checked AWS Forums and StackOverflow.
- [X] I've searched for previous similar issues and didn't find any solution.
Describe the bug
Hi, I'm using vite 5.0.11 and I'm trying to use retrieve credentials using fromSSO approach but the following issue appears:
The requested module '/node_modules/.vite/deps/@aws-sdk_credential-providers.js?v=4d2ccf96' does not provide an export named 'fromSSO'
.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
20.10.0
Reproduction Steps
import { fromSSO } from '@aws-sdk/credential-providers';
const credentials = await fromSSO({
profile: '<my-profile>'
})();
const client = new S3Client({
region: 'us-east-1',
credentials,
});
Observed Behavior
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/@aws-sdk_credential-providers.js?v=4d2ccf96' does not provide an export named 'fromSSO' at
Expected Behavior
My credentials are retrieved correctly in according with the SDK documentation.
Possible Solution
No response
Additional Information/Context
No response
Hi, sorry for this bug. We will release a fix for this today. Same root cause: https://github.com/aws/aws-sdk-js-v3/issues/5692
It is due to incomplete export annotations in the latest build.
Actually, I'm having trouble reproducing this on 3.495.0. ~What version of the SDK packages do you have?~
Can you show your build configuration and build commands?
I didn't reproduce it, but, this release should address the issue: https://www.npmjs.com/package/@aws-sdk/credential-providers/v/3.496.0
Hi kuhe, thanks for the update. At the first touch seems that passing through the backend with the 3.496.0 the credentials are correctly retrieved, instead using FE side, nope. Anyway somehow using BE it is not a problem, my side. So, what do you mean for "build commands"? I mean, I'm using the classical vite build with npm, with no special things.
What are the reproduction steps and error for the front end issue you are referring to?
Some as the first post. I've just updated the package with the last version released and into the console I received the same error:
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/@aws-sdk_credential-providers.js?v=4d2ccf96' does not provide an export named 'fromSSO' at
Just import the lib, then set the configuration like the profile (sso) as defined into my local machine using the CLI tool and that's.
Sounds strange because passing through the BE this issue not appears (my BE developer tell me this).
is this still affecting vite builds as of v3.515.0 or later?
yes it seems like this is still failing on 3.523.0
any update on this? i am experiencing the exact same issue as alenocera@ where the BE calls work but not from a react FE
The original reported issue says it's for Node.js. fromSSO
is not available in the browser https://www.npmjs.com/package/@aws-sdk/credential-providers#fromsso.
What are you trying to do with the application? Could you create a minimal reproduction example repository?
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
Our side we use it through the BE as I told in the previous message. As I far know, with my teammates we doesn't care about using it through the FE anymore, so we stopped our development by using it in this way. Maybe @githubb404 expected some news, I don't know....we can rely on his reply.
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.