-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Can't resolve 'crypto' in Angular 12 with Webpack 5 #908
Comments
As the error message explains: webpack 5 removed default browser polyfills. Install crypto-browserify and add it as a resolve.fallback to your webpack.config. webpack.config.js module.exports = {
resolve: {
fallback: {
crypto: require.resolve('crypto-browserify')
},
},
}; |
can you tell me where can i find webpack.config. |
You have to modify your I don't know if I'm allowed to post links here, but where are plenty tutorials explaining it in detail. So I recommend you just search for "angular custom webpack config" and follow a guide you like. |
If it's Twilio you use: The Twilio module is not intended for use in client-side JavaScript, which is why it fails for your Angular application. Twilio uses your Account SID and your Auth Token, the use in the client side represents a risk; |
In order to use custom weback do the following.
|
I installed node-forge in application based on Angular 12 and Webpack 5. While building app throwing below error message and looking for help:
The text was updated successfully, but these errors were encountered: