To fix Module not found: Error: Can’t resolve ‘crypto’ with JavaScript, we add the crypto
to the browser
section of package.json.
For instance, we write
{
//...
"browser": {
"crypto": false
}
//...
}
in package.json to disable the crypto
module in the browser environment by setting crypto
to false
.