I installed the @aws-sdk/cloudfront-signer package using the “npm install @aws-sdk/cloudfront-signer” command in an Angular 14 Application.
After that, I get an error:
“BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
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 }”
I have tried different ways to fix this error. Here are the links of the ways I tried:
https://forum.algorand.org/t/webpack-5-pollyfill-error/7806
How to Polyfill node core modules in webpack 5
i tried to Polyfill modules in webpack 5 but not working (Reactjs)
I also tried manually installing packages:
“crypto”: “npm:crypto-browserify”,
“crypto-browserify”: “^3.12.0”,
But then there were errors with the package requirements, and even after this installation
“stream”: “^0.0.2”,
“vm”: “^0.1.0”,
my code still wouldn’t compile.
Can you please tell me if anyone has tried to install the https://www.npmjs.com/package/@aws-sdk/cloudfront-signer or https://www.npmjs.com/package/aws-cloudfront-sign package on an Angular application? If so, could you provide a link or advice on what I could do to install these packages on an Angular application?