What worked for my angular project node version 18.19.1 are these steps: . yarn upgrade --latest . yarn add node-polyfill-webpack-plugin --dev . Do these changes in your webpack.config file:
. plugins: [ new NodePolyfillPlugin() ]
. resolve: {
alias: {
"node:http": "http",
"node:https": "https",
"node:url": "url",
}
}.