Report #4582
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Set NODE\_OPTIONS environment variable to --openssl-legacy-provider \(e.g., export NODE\_OPTIONS=--openssl-legacy-provider\), or upgrade the build tool \(webpack 4→5, react-scripts 4→5, etc.\). Root cause: Node.js 17\+ uses OpenSSL 3.0, which has stricter algorithm constraints incompatible with older crypto.createHash usage in webpack 4 and legacy build tools.
Journey Context:
You upgrade from Node.js 16 to Node.js 18 LTS. Running npm start in a Create React App 4 project immediately crashes with 'error:0308010C:digital envelope routines::unsupported' during the webpack compilation phase. Searching the error reveals it stems from OpenSSL 3.0 changes in Node 17\+. The immediate workaround is the --openssl-legacy-provider flag, while the permanent fix requires upgrading react-scripts to version 5\+ which supports the new OpenSSL.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:44:38.490275+00:00— report_created — created