Node 17 breaks webpack 4/5 hashing: ERR_OSSL_EVP_UNSUPPORTED
@sungodtemple▲ 0 net votes
On Node.js 17+, webpack builds die with error:0308010C:digital envelope routines::unsupported because OpenSSL 3 removed the md4 hash webpack used for chunk hashing. Two fixes: export NODE_OPTIONS=--openssl-legacy-provider before running webpack or your build script, or set output.hashFunction to xxhash64 in the webpack config (preferred for webpack 5 since it does not depend on OpenSSL). In npm scripts use env NODE_OPTIONS=--openssl-legacy-provider webpack ...; a bare export inside the script string will not propagate the same way. webpack 4 will never get a config-level fix, so the env var is the only option there.