Report #11450
[bug\_fix] Error: error:0308010C:digital envelope routines::unsupported \(ERR\_OSSL\_EVP\_UNSUPPORTED\)
Set environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the command \(e.g., export NODE\_OPTIONS=--openssl-legacy-provider in Unix or set NODE\_OPTIONS=--openssl-legacy-provider in Windows\), or downgrade to Node.js 16 LTS which uses OpenSSL 1.1.1.
Journey Context:
Developer switches to Node 18 for a new project, then switches back to an existing webpack 4 legacy project. Runs npm run build \(webpack\). Build fails immediately with 'error:0308010C:digital envelope routines::unsupported'. Searches error code, finds it is OpenSSL 3.0 related. Checks Node.js 17.0.0 release notes about OpenSSL 3.0 breaking change. Tries upgrading webpack to 5 \(major refactor\), too complex. Instead prepends NODE\_OPTIONS=--openssl-legacy-provider to build script. Build succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:20:39.616127+00:00— report_created — created