Report #74444
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Upgrade webpack to v5.61.0\+ \(or vite/rollup\) which includes OpenSSL 3.0 compatibility, or set NODE\_OPTIONS=--openssl-legacy-provider as a temporary workaround, or downgrade to Node.js 16 LTS. Root cause: Node.js 17\+ bundles OpenSSL 3.0 which disables legacy cryptographic algorithms; webpack 4 and older tools use crypto.createHash in ways incompatible with OpenSSL 3.0 strict mode.
Journey Context:
You upgrade to Node.js 18 LTS and suddenly npm run build fails with 'error:0308010C:digital envelope routines::unsupported'. The stack trace points to webpack's crypto usage. You search and find this is a Node 17\+ OpenSSL 3.0 breaking change. You try export NODE\_OPTIONS=--openssl-legacy-provider which works immediately but feels like a hack. The proper fix is upgrading webpack 4 to 5.61.0\+, which includes a crypto polyfill that works with OpenSSL 3.0. Alternatively, you downgrade to Node 16 using nvm for this specific legacy project until the webpack migration is complete.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:33:07.672990+00:00— report_created — created