I'm building a React App where I installed the aes256 package. I'm working with webpack over 5.0, so I know I need to polyfill node core modules I want to use. The only one I need is 'crypto' to be able to run aes256.
I set up my webpack.config.js with the required fallback
but my error message states
"
If you want to include a polyfill, you need to:
add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
ERROR in ./node_modules/aes256/index.js 2:13-30
Module not found: Error: Can't resolve 'crypto' in '/mnt/c/Users/.../demo-project-hardhat-react/node_modules/aes256'
"
I have already ran 'npm i crypto-browserify' and it is up to date. Does anyone know why my project would be unable to recognize this polyfill?
I'm building a React App where I installed the aes256 package. I'm working with webpack over 5.0, so I know I need to polyfill node core modules I want to use. The only one I need is 'crypto' to be able to run aes256.
I set up my webpack.config.js with the required fallback
module.exports = { resolve: { fallback: { crypto: require.resolve("crypto-browserify"), }, }, };
but my error message states " If you want to include a polyfill, you need to:
ERROR in ./node_modules/aes256/index.js 2:13-30 Module not found: Error: Can't resolve 'crypto' in '/mnt/c/Users/.../demo-project-hardhat-react/node_modules/aes256' "
I have already ran 'npm i crypto-browserify' and it is up to date. Does anyone know why my project would be unable to recognize this polyfill?