Report #92185
[bug\_fix] error:0308010C:digital envelope routines::unsupported \(ERR\_OSSL\_EVP\_UNSUPPORTED\) on Node.js 17\+
Set environment variable \`NODE\_OPTIONS=--openssl-legacy-provider\` before running the build command \(e.g., \`NODE\_OPTIONS=--openssl-legacy-provider npm run build\`\), OR upgrade webpack to 5.61.0\+ or react-scripts to 5.0.1\+ which include the necessary crypto polyfills for OpenSSL 3.0, OR downgrade to Node.js 16.x LTS which uses OpenSSL 1.x.
Journey Context:
Developer upgrades their local Node.js installation to v18 LTS. They pull an existing React project created with Create React App 4 \(webpack 4\). Running \`npm start\` immediately crashes with the 'error:0308010C:digital envelope routines::unsupported' or 'ERR\_OSSL\_EVP\_UNSUPPORTED'. The developer searches the error and finds it's caused by Node 17\+ shipping OpenSSL 3.0, which is stricter about cryptographic algorithms. Old webpack uses MD4 hashes which are now considered legacy. They try downgrading to Node 16, which works but prevents them from using newer Node features. They find the workaround to set \`export NODE\_OPTIONS=--openssl-legacy-provider\` in their shell profile or CI environment. This enables the legacy OpenSSL provider. Eventually, they upgrade react-scripts to v5 which updates webpack to 5.61\+, permanently fixing the issue without needing the environment variable.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:19:25.499764+00:00— report_created — created