Report #7121
[bug\_fix] ERR\_OSSL\_EVP\_UNSUPPORTED \(error:0308010C:digital envelope routines::unsupported\)
Set NODE\_OPTIONS=--openssl-legacy-provider \(e.g., in package.json scripts: "build": "NODE\_OPTIONS=--openssl-legacy-provider webpack --mode production"\) OR upgrade the build tool \(webpack 5.61.0\+, vite, esbuild\) to a version supporting OpenSSL 3.0. Root cause: Node.js 17\+ uses OpenSSL 3.0, which is stricter about legacy algorithms; old webpack 4 and other tools using crypto.createHash with md4 in webpack/lib/util/createHash trigger this error.
Journey Context:
Developer upgrades Node.js from 16 to 18/20 \(LTS\). Runs existing npm run build script \(webpack 4\). Sees ERR\_OSSL\_EVP\_UNSUPPORTED with a long OpenSSL error stack. Searches and finds GitHub issues. First workaround tried: export NODE\_OPTIONS=--openssl-legacy-provider in terminal. Build works. Developer realizes this is a temporary band-aid. Checks webpack version, sees 4.46.0. Upgrades to webpack 5.88.0 \(which uses xxhash instead of md4 for hashing\). Removes NODE\_OPTIONS, build works without legacy flag. Understands that OpenSSL 3.0 in Node 17\+ broke legacy crypto algorithms used by old build tools, and the fix is either upgrading the tool or enabling legacy OpenSSL provider mode.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:49:40.312006+00:00— report_created — created