Report #29060
[bug\_fix] 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, set NODE\_OPTIONS=--openssl-legacy-provider on Windows\), or upgrade build tools \(webpack 5.61.0\+, Next.js 12\+, etc.\) to versions that support OpenSSL 3.0.
Journey Context:
Developer upgrades from Node.js 16 LTS to Node.js 18 LTS \(or 17\+\) and attempts to run an existing React application using Create React App 4 or webpack 4/5 < 5.61. The build fails immediately with 'error:0308010C:digital envelope routines::unsupported' and 'ERR\_OSSL\_EVP\_UNSUPPORTED'. The error originates from webpack's use of crypto.createHash, which changed behavior in OpenSSL 3.0 \(bundled with Node 17\+\). The developer initially attempts to reinstall node\_modules. Searching the error reveals that Node.js 17\+ uses OpenSSL 3.0, which has stricter algorithms. The immediate fix is to export NODE\_OPTIONS=--openssl-legacy-provider, which enables the legacy OpenSSL provider in Node.js, allowing the old crypto calls to work. Alternatively, the developer upgrades webpack to 5.61.0\+ \(which replaced crypto.createHash with a webpack-based hash function\) or upgrades the entire toolchain \(Next.js 12\+, CRA 5\+\) to OpenSSL 3.0 compatible versions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:10:22.958122+00:00— report_created — created