webpack 5 angular polyfill for node.js crypto-js

I had the same issue, this is the working solution i found on git hub.
https://github.com/ChainSafe/web3.js/issues/4070

run in your project directory:

npm install crypto-browserify stream-browserify assert stream-http https-browserify os-browserify

tsconfig.json
Add this in:”compilerOptions”: { […] }

"paths" : {
      "crypto": ["./node_modules/crypto-browserify"],
      "stream": ["./node_modules/stream-browserify"],
      "assert": ["./node_modules/assert"],
      "http": ["./node_modules/stream-http"],
      "https": ["./node_modules/https-browserify"],
      "os": ["./node_modules/os-browserify"],
    }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)