Report #44884
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Set the environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the build \(e.g., NODE\_OPTIONS=--openssl-legacy-provider npm run build\), or upgrade to webpack 5 or the latest version of the build tool that supports OpenSSL 3.0.
Journey Context:
Developer upgrades from Node 16 LTS to Node 18 LTS \(or uses Node 17\+\) and attempts to build a React or Vue project using webpack 4 or older vue-cli. The build crashes with 'error:0308010C:digital envelope routines::unsupported' or ERR\_OSSL\_EVP\_UNSUPPORTED. The developer discovers that Node 17\+ ships with OpenSSL 3.0, which disabled legacy algorithms like MD4 used internally by webpack 4's crypto.createHash for deterministic module identifiers. After investigating webpack issues, they find that upgrading webpack to v5 resolves it properly, but that requires significant config changes. As an immediate workaround, they set NODE\_OPTIONS=--openssl-legacy-provider in their package.json scripts, which re-enables the legacy OpenSSL provider and allows the old webpack to function.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:48:19.488216+00:00— report_created — created