I installed the jsonwebtoken package and ever since I'm getting the following error on running the React app :

I tried installing the crypto-browserify package but that too didn't resolve the issue.
Try adding the following just after the devDependencies in your package.json
"devDependencies": {
...
},
"browser": {
"crypto": false
}
I was facing the same issue. I was trying to generate the keys on in React and was getting the same issue. Now the issue is resolved. Just follow the steps given in link https://github.com/ChainSafe/web3.js#troubleshooting-and-known-issues Also add these two in package.json
"dependencies": {
"crypto": "npm:crypto-browserify",
"stream": "npm:stream-browserify",
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With