Report #85522
[bug\_fix] Error: error:0308010C:digital envelope routines::unsupported \(ERR\_OSSL\_EVP\_UNSUPPORTED\)
Set the environment variable NODE\_OPTIONS to --openssl-legacy-provider \(e.g., export NODE\_OPTIONS=--openssl-legacy-provider on Unix or set NODE\_OPTIONS=--openssl-legacy-provider on Windows\), or upgrade the build toolchain \(webpack, babel, CRA, Vite\) to versions compatible with OpenSSL 3.0.
Journey Context:
A developer upgrades from Node 14 to Node 18 \(or uses Node 17\+ for the first time\) to work on an existing React project using webpack 4 or Create React App 4. They run npm start. Instead of the dev server, they get a cryptic OpenSSL error: 'error:0308010C:digital envelope routines::unsupported'. They search the error and find it relates to Node 17\+ using OpenSSL 3.0, which is stricter and breaks old webpack crypto polyfills. They try downgrading Node \(works but undesirable\). They find the Node.js documentation mentioning --openssl-legacy-provider flag. They prepend NODE\_OPTIONS=--openssl-legacy-provider to their package.json start script. The dev server starts successfully. This works because the flag enables the legacy OpenSSL provider in Node's crypto module, allowing the old algorithms that webpack 4 relies on. The permanent fix is upgrading to webpack 5 / CRA 5\+.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:08:01.166166+00:00— report_created — created