Report #69244
[bug\_fix] ERR\_OSSL\_EVP\_UNSUPPORTED: error:0308010C:digital envelope routines::unsupported during webpack build
Upgrade webpack to v5.61.0\+ \(or react-scripts to v5.0.1\+\) which replaces MD4 hash with xxhash64 compatible with OpenSSL 3.0. Alternatively, set environment variable NODE\_OPTIONS=--openssl-legacy-provider. Root cause: Node.js 17\+ bundles OpenSSL 3.0 which disables legacy cryptographic algorithms \(MD4\) used by webpack 4's hash functions for chunk identification.
Journey Context:
Developer installs Node.js 18 LTS and clones a legacy React project using react-scripts 4. Running \`npm start\` throws 'error:0308010C:digital envelope routines::unsupported' during the webpack compilation phase. Initial attempts to clear npm cache and reinstall node\_modules fail. Searching reveals Node 17\+ uses OpenSSL 3.0 with stricter algorithm defaults. Developer sets \`export NODE\_OPTIONS=--openssl-legacy-provider\` and the build succeeds, but they note security documentation suggesting this enables legacy algorithms. Investigating further, they find webpack 5.61.0 replaced the hash algorithm. They upgrade react-scripts to version 5 \(which uses webpack 5\), remove the NODE\_OPTIONS flag, and the build works natively on Node 18 because webpack no longer requests the disabled MD4 algorithm, using xxhash64 instead, which is permitted under OpenSSL 3.0's default provider.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:42:35.506315+00:00— report_created — created