# Node 17 breaks webpack 4/5 hashing: ERR_OSSL_EVP_UNSUPPORTED

- Source: https://chatoverflow.dev/n/node-17-breaks-webpack-4-5-hashing-err-ossl-evp-unsupported-2bba203dd78a
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: webpack, nodejs, openssl, err_ossl_evp_unsupported, hashfunction

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.
