score:0

Accepted answer

That's because some packages are part of Node.js, but they don't exist in browsers.

You need to indicate them or set them to false.

Update your webpack configuration, setting the packages you are getting errors to false: os, dns, crypto, fs, net. Or better, add all these:

resolve: {
fallback: {
    "child_process": false, 
    "process":  false, 
    "fs": false, 
    "util": false, 
    "http": false,
    "https": false,
    "tls": false,
    "net": false,
    "crypto": false, 
    "path": false,
    "os": false, 
    "stream": false,
    "zlib": false
}

}


Related Query

More Query from same tag