Angular 6 many Can't resolve errors (crypto, fs, http, https, net, path, stream, tls, zlib)

This is caused by dependencies importing node modules that are not available in the browser. Add to your package.json the modules that give errors:

"browser": {
    "http": false,
    "https":false,
    "net": false,
    "path": false,
    "stream": false,
    "tls": false
}

You are using the latest version of Angular CLI. Some npm packages are no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.

To fix your issue with crypto, stream libs, go to,

node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js

file and do the following change,

`node: {crypto: true, stream: true}`