Report #45979
[bug\_fix] error:0308010C:digital envelope routines::unsupported - OpenSSL 3.0
Set environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the command \(export NODE\_OPTIONS=--openssl-legacy-provider on Unix, set NODE\_OPTIONS=--openssl-legacy-provider on Windows PowerShell\), or upgrade webpack to 5.61.0\+ and react-scripts to 5.0.1\+
Journey Context:
A developer upgrades from Node.js 16 to Node.js 18 \(or 17\+\) and attempts to run their React application with npm start. The build immediately crashes with "error:0308010C:digital envelope routines::unsupported" or "ERR\_OSSL\_EVP\_UNSUPPORTED" originating from webpack's crypto usage. The developer searches and discovers that Node.js 17\+ ships with OpenSSL 3.0, which has stricter security policies that break older webpack 4 and 5 versions that use crypto.createHash with algorithms unsupported in OpenSSL 3.0 strict mode. The immediate workaround is setting the NODE\_OPTIONS environment variable to --openssl-legacy-provider, which enables OpenSSL 3.0 legacy algorithms. The permanent fix is upgrading webpack to 5.61.0 or higher \(or react-scripts 5.0.1\+\) which include patches to support OpenSSL 3.0 natively.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:39:02.275824+00:00— report_created — created