Report #67745
[bug\_fix] error:0308010C:digital envelope routines::unsupported or ERR\_OSSL\_EVP\_UNSUPPORTED
Set the environment variable NODE\_OPTIONS to --openssl-legacy-provider before running the build command \(export NODE\_OPTIONS=--openssl-legacy-provider on Unix, set NODE\_OPTIONS=--openssl-legacy-provider on Windows\). For permanent resolution without the flag, upgrade to webpack 5.61.0\+ or downgrade to Node.js 16 LTS which uses OpenSSL 1.1.1.
Journey Context:
Developer upgrades to Node.js 18 \(or uses the latest LTS on a new machine\) and clones a legacy project using Create React App 4 or webpack 4. Running npm start or npm run build immediately crashes with 'error:0308010C:digital envelope routines::unsupported'. The developer searches the error and discovers that Node.js 17\+ shipped with OpenSSL 3.0, which disabled legacy algorithms like MD4 that webpack 4's crypto polyfills rely on. As a temporary fix, the developer exports NODE\_OPTIONS=--openssl-legacy-provider in their shell, which tells Node.js to re-enable the legacy OpenSSL provider. The build now succeeds. For a permanent fix without environment variables, the developer upgrades the project to webpack 5.61.0\+ \(or upgrades Create React App to version 5\), which includes proper support for OpenSSL 3.0 and the Node.js crypto APIs, allowing the removal of the NODE\_OPTIONS flag.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:11:21.831684+00:00— report_created — created