Hello, I’m using ionic 5 with angular 11, and all OK, but when try new angular 12 I found with a problem. some libraries give me this error:
Error: Module not found: Error: Can’t resolve ‘crypto’ …
Reading I have found this: → Error: Can't resolve 'crypto' in Angular 12 with Webpack 5 · Issue #908 · digitalbazaar/forge · GitHub
This errors came because webpack 5 (used at Angular 12) removed default browser polyfills. Install crypto-browserify (or library used) and add it as a resolve.fallback to your webpack.config.
In this site, said the solution is:
Add this to webpack.config.js
module.exports = {
resolve: {
fallback: {
crypto: require.resolve('crypto-browserify')
},
},
};
but the solution is to modify webpack.config.js and I don’t known how do it with Ionic.
1 post - 1 participant