Report #14009
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Set environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the command, or upgrade to webpack 5.61.0\+ / Next.js 12\+ /CRA 5\+ which use xxhash instead of MD4. Root cause: Node.js 17\+ bundles OpenSSL 3.0 which disables legacy cryptographic algorithms by default; older webpack versions use crypto.createHash with MD4 which is now unsupported.
Journey Context:
A developer upgrades their local Node.js version from 16.20 to 18.17 LTS to get security patches. They navigate to a legacy project created in 2021 using Create React App 4 \(webpack 4\). They run npm start. Instead of the dev server, they get a cryptic OpenSSL error: "error:0308010C:digital envelope routines::unsupported" with an OpenSSL error stack. The developer searches the error code and finds GitHub issues explaining that Node 17 changed to OpenSSL 3.0. They try upgrading React Scripts to version 5 \(webpack 5\), but this breaks other configurations in their project. They find the workaround: export NODE\_OPTIONS=--openssl-legacy-provider on Mac/Linux or set NODE\_OPTIONS=--openssl-legacy-provider in Windows PowerShell. Running npm start again works immediately. The fix works because the --openssl-legacy-provider flag enables the OpenSSL legacy provider module in OpenSSL 3.0, which re-enables the MD4 algorithm that webpack 4's crypto.createHash call requires to build its internal hashing for module identification.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T20:22:17.071671+00:00— report_created — created