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
}