Report #14326
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Set environment variable NODE\_OPTIONS=--openssl-legacy-provider to enable OpenSSL 3.0 legacy provider, or upgrade webpack 5.61.0\+ / react-scripts 5\+ which support OpenSSL 3.0, or downgrade to Node.js 16 LTS which uses OpenSSL 1.1.1.
Journey Context:
Upgraded to Node.js 17 or 18 which ships OpenSSL 3.0. Running an older project with webpack 4 or react-scripts 4, the build fails with 'error:0308010C:digital envelope routines::unsupported'. This happens because OpenSSL 3.0 in Node 17\+ changed provider loading and disabled legacy algorithms by default, breaking crypto.createHash usage in old webpack. You initially think your SSL certificates are broken. Trying to reinstall node\_modules doesn't help. Research reveals Node 17\+ uses OpenSSL 3.0. The immediate fix is the --openssl-legacy-provider flag which enables the legacy OpenSSL provider. Long term, upgrading build tools to versions that explicitly support OpenSSL 3.0 is required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:16:49.949855+00:00— report_created — created