GithubHelp home page GithubHelp logo

TypeError: __WEBPACK_IMPORTED_MODULE_0_aws_sdk_global__.util.crypto.lib.randomBytes is not a function about serverless-stack-demo-client HOT 7 CLOSED

 avatar commented on May 21, 2024
TypeError: __WEBPACK_IMPORTED_MODULE_0_aws_sdk_global__.util.crypto.lib.randomBytes is not a function

from serverless-stack-demo-client.

Comments (7)

 avatar commented on May 21, 2024

Solved by downgrading AWS SDK. There is a bug in latest version: https://stackoverflow.com/questions/48174252/util-crypto-lib-randombytes-is-not-a-function-aws-cognito-js-throws-error-on

amazon-archives/amazon-cognito-identity-js#646

from serverless-stack-demo-client.

aloukissas avatar aloukissas commented on May 21, 2024

Which version of the aws-sdk did you use?

from serverless-stack-demo-client.

aloukissas avatar aloukissas commented on May 21, 2024

It would be great if we get a workaround. Downgrading to 2.177.0 doesn't seem to help.

from serverless-stack-demo-client.

 avatar commented on May 21, 2024

I got the error when using the latest version. Then I downgraded to 2.177.0 and it worked.

from serverless-stack-demo-client.

 avatar commented on May 21, 2024

This is my package.json for the serverless-stack-demo-client:

{
  "name": "app-client",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "amazon-cognito-identity-js": "^1.29.0",
    "react": "^16.2.0",
    "react-bootstrap": "^0.32.0",
    "react-dom": "^16.2.0",
    "react-router-dom": "^4.2.2",
    "react-scripts": "1.0.17"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

from serverless-stack-demo-client.

aloukissas avatar aloukissas commented on May 21, 2024

This didn't fix it for me. What did fix it: I had to manually tell amazon-cognito-identity-js to pull aws-sdk 2.176.0 and redo npm install within node_modules/amazon-cognito-identity-js

from serverless-stack-demo-client.

jayair avatar jayair commented on May 21, 2024

@appernetic @aloukissas Thanks for tracking it down on your end guys.

from serverless-stack-demo-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.