Report #9116
[bug\_fix] error:0308010C:digital envelope routines::unsupported / ERR\_OSSL\_EVP\_UNSUPPORTED
Set the environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the command, or upgrade build tools \(webpack 4→5, vite, etc.\) to versions compatible with OpenSSL 3.0. Root cause: Node.js 17\+ uses OpenSSL 3.0, which disables legacy cryptographic algorithms by default; older webpack 4 and other tools using crypto.createHash with legacy options fail.
Journey Context:
A developer upgrades their local Node.js version from 16 to 18 LTS. Upon running npm run build in a Create React App project using webpack 4, the build crashes with 'error:0308010C:digital envelope routines::unsupported' and 'ERR\_OSSL\_EVP\_UNSUPPORTED'. Searching reveals this is due to OpenSSL 3.0 in Node 17\+. As a temporary workaround, they export NODE\_OPTIONS=--openssl-legacy-provider in their shell profile, allowing the build to complete. The permanent fix involves upgrading the project's webpack configuration to version 5, which properly handles the new OpenSSL provider.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:18:40.225986+00:00— report_created — created