Report #12534
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Set NODE\_OPTIONS=--openssl-legacy-provider environment variable, or upgrade to Webpack 5 / latest build tools
Journey Context:
Developer upgrades to Node.js 17\+ or uses the latest LTS, then tries to build an existing React app created with Create React App 4 or Webpack 4. The build crashes immediately with "error:0308010C:digital envelope routines::unsupported". The rabbit hole involves searching the error and finding it relates to OpenSSL 3.0, which Node 17\+ uses by default. Old webpack 4 uses crypto.createHash with algorithms that OpenSSL 3.0 considers legacy and disabled by default. They try reinstalling node\_modules, upgrading npm packages partially, but the error persists because the webpack version is pinned. The fix is to set environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the build. This works because the flag tells Node.js to enable the legacy OpenSSL 3.0 provider which supports the legacy cryptographic algorithms \(like md4 used in webpack's hash generation\) that were disabled by default for security reasons.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:16:35.791126+00:00— report_created — created