Report #78240
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Set environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the build command, or upgrade to webpack 5.61.0\+ / Next.js 12.0.9\+ / react-scripts 5.0.1\+ which contain the necessary crypto fixes. Root cause: Node.js 17\+ bundles OpenSSL 3.0 which has stricter algorithm standards. Old webpack 4 \(and some other tools\) use crypto.createHash with algorithms that OpenSSL 3.0 considers legacy/unsupported in its default provider.
Journey Context:
You install Node.js 17 or 18 on a new machine \(or upgrade from Node 16\) and try to run your existing React/Vue/Angular project. During the webpack compilation phase, it crashes with 'error:0308010C:digital envelope routines::unsupported'. The error is cryptic and doesn't mention webpack or Node directly. You search online and find GitHub issues suggesting to downgrade to Node 16 LTS. You do that and it works, but you need Node 18 features or want to stay current. You dig into the Node 17 release notes and see 'OpenSSL 3.0' mentioned. You try setting NODE\_OPTIONS=--openssl-legacy-provider and suddenly the build works. You realize webpack 4 is fundamentally incompatible with OpenSSL 3.0's stricter crypto. You upgrade to webpack 5.61.0\+ which includes the fix \(using md4 wasm instead of native crypto for hashing\) or upgrade your meta-framework \(Next.js, CRA\) to a version that supports Node 18.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:55:19.340464+00:00— report_created — created