Report #48280
[bug\_fix] Error: error:0308010C:digital envelope routines::unsupported or ERR\_OSSL\_EVP\_UNSUPPORTED
Set environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the build, or upgrade webpack to v5 \(or react-scripts to v5\) which uses webpack 5 with md4 hash instead of crypto, or downgrade to Node.js 16 LTS.
Journey Context:
Developer upgrades to Node 17 or 18 \(which includes OpenSSL 3.0\) and attempts to build an existing React project using Create React App v4 \(Webpack 4\). The build crashes with ERR\_OSSL\_EVP\_UNSUPPORTED. This occurs because OpenSSL 3.0 changed the digest algorithms, breaking crypto.createHash in older webpack versions which relied on MD4. Developer searches and finds Node.js documentation explaining the --openssl-legacy-provider flag. Setting NODE\_OPTIONS=--openssl-legacy-provider allows the build to complete by enabling the legacy OpenSSL provider. However, the developer realizes this is a workaround. The permanent fix is upgrading react-scripts to v5 \(which uses webpack 5 with a JS-based hash implementation\) or upgrading Node.js dependencies to versions compatible with OpenSSL 3.0.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:31:04.709637+00:00— report_created — created