aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.44k stars 2.13k forks source link

@aws-sdk/client-cognito-identity@3.6.1 is using `Sha256` that is not included in @aws-crypto/sha256-browser@1.2.2 #9483

Closed L0y3r closed 2 years ago

L0y3r commented 2 years ago

Before opening, please confirm:

JavaScript Framework

Not applicable

Amplify APIs

Not applicable

Amplify Categories

Not applicable

Environment information

``` # Put output below this line System: OS: macOS 11.6.2 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 126.16 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.1 - ~/.asdf/installs/nodejs/lts/bin/node npm: 8.1.2 - ~/.asdf/plugins/nodejs/shims/npm Browsers: Chrome: 97.0.4692.71 Firefox: 96.0.1 Safari: 15.2 npmPackages: @popperjs/core: ^2.10.2 => 2.11.2 @snowpack/plugin-dotenv: ^2.1.0 => 2.2.0 @snowpack/plugin-postcss: ^1.4.3 => 1.4.3 @snowpack/plugin-sass: ^1.4.0 => 1.4.0 @snowpack/plugin-svelte: ^3.6.1 => 3.7.0 @snowpack/plugin-webpack: ^3.0.0 => 3.0.0 @snowpack/web-test-runner-plugin: ^0.2.2 => 0.2.2 @testing-library/svelte: ^3.0.3 => 3.0.3 @web/test-runner: ^0.13.3 => 0.13.25 autoprefixer: ^10.3.4 => 10.4.2 aws-amplify: ^4.3.12 => 4.3.12 bootstrap: ^5.1.1 => 5.1.3 chai: ^4.3.4 => 4.3.4 eslint: ^7.32.0 => 7.32.0 eslint-config-airbnb-base: ^14.2.1 => 14.2.1 eslint-config-prettier: ^8.3.0 => 8.3.0 eslint-plugin-import: ^2.25.2 => 2.25.4 eslint-plugin-svelte3: ^3.2.0 => 3.4.0 plugin-webpack-test-minimal: undefined () postcss: ^8.3.6 => 8.4.5 prettier: ^2.4.1 => 2.5.1 prettier-plugin-svelte: ^2.4.0 => 2.6.0 snowpack: ^3.3.7 => 3.8.8 svelte: ^3.37.0 => 3.46.2 tinro: ^0.6.7 => 0.6.10 npmGlobalPackages: @aws-amplify/cli: 7.6.9 ```

Describe the bug

When I just import Amplify in the project, snowpack throw this error

image

After a research I found that this is the file that causes the error, so maybe upgrading the version of it can fix it

Expected behavior

Not throw an error

Reproduction steps

  1. npx create-snowpack-app test --template @snowpack/app-template-svelte
  2. npm i aws-amplify
  3. Add polyfillNode: true to packageOptions in snowpack.config.mjs
  4. npm start

Code Snippet

// In App.svelte
<script>
  // ...
  import { Amplify } from 'aws-amplify';
  console.log(Amplify);
</script>

Log output

``` // Put your logs below this line ```

aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

L0y3r commented 2 years ago

After a deeper research I found that this error belongs to snowpack library instead of this, so I'll close it

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.