@aws-sdk v1.0.0-gamma.4 does not export ESM
See original GitHub issueDescribe the bug In an ESM application using aws-amplify library 3.4.6, we encounter a runtime issue when the library is calling functions on @aws-sdk/credential-provider-cognito-identity.
Eg. of javascript runtime issue when calling :
object(...) is not a function
In my case, it was breaking on the following line which was generating a login issue during the oauth step.
After investigation, @aws-sdk/credential-provider-cognito-identity@1.0.0-gamma.4 does not export ESM in the NPM published versionned. This issue is fixed from @aws-sdk/credential-provider-cognito-identity@1.0.0-gamma.6
To Reproduce
$ yarn add @aws-sdk/credential-provider-cognito-identity@1.0.0-gamma.4
$ ls node_modules/@aws-sdk/credential-provider-cognito-identity/dist
cjs
$ yarn add @aws-sdk/credential-provider-cognito-identity@1.0.0-gamma.6
$ ls node_modules/@aws-sdk/credential-provider-cognito-identity/dist
cjs es
Expected behavior All aws-sdk packages should export ESM
Additional context Happens on all browsers.
Suggested fix Bump @aws-sdk packages dependencies to v1.0.0-gamma.6 or higher
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
The fix is now released. Thanks for bringing this to our attention 👍
Hello @superCarton and @shox-harri, this is fixed in #6748 and is now published on
unstable
npm tag. We will update you once it gets released to latest – meanwhile, please feel free to useaws-amplify@unstable
to unblock yourself, thanks!