Report #71701
[bug\_fix] Error: error:0308010C:digital envelope routines::unsupported \| ERR\_OSSL\_EVP\_UNSUPPORTED
Set NODE\_OPTIONS environment variable to --openssl-legacy-provider, or upgrade webpack and related build tools to versions compatible with OpenSSL 3.0
Journey Context:
Developer upgrades from Node 16 to Node 18 \(or 17\+\) which ships with OpenSSL 3.0. Running npm run build on an existing React project \(using webpack 4 or react-scripts 4\) immediately crashes with "error:0308010C:digital envelope routines::unsupported" or code ERR\_OSSL\_EVP\_UNSUPPORTED. Developer searches the error and learns that OpenSSL 3.0 has stricter algorithms, and older webpack uses crypto.createHash in a way that triggers this. The immediate fix is to enable the legacy OpenSSL provider via NODE\_OPTIONS. On Linux/Mac: export NODE\_OPTIONS=--openssl-legacy-provider. On Windows PowerShell: $env:NODE\_OPTIONS="--openssl-legacy-provider". On Windows CMD: set NODE\_OPTIONS=--openssl-legacy-provider. The build then works. The permanent fix is upgrading to webpack 5 and react-scripts 5, which properly support OpenSSL 3.0. Developer uses the env var as a temporary workaround while planning the webpack upgrade.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:55:48.311703+00:00— report_created — created