Report #100977
[bug\_fix] Error: error:0308010C:digital envelope routines::unsupported at new Hash \(node:internal/crypto/hash:71:19\)
Set NODE\_OPTIONS=--openssl-legacy-provider in your shell or package.json scripts, for example "build": "NODE\_OPTIONS=--openssl-legacy-provider vite build". The real fix is to upgrade webpack to v5.76.0\+ and update loaders/plugins so they no longer rely on the legacy OpenSSL provider.
Journey Context:
You install Node 18 or 20 and try to build an older project using webpack 4. The build crashes with an OpenSSL error in crypto.createHash. You learn Node 17\+ ships OpenSSL 3.0, which disabled some legacy algorithms that old webpack uses. You add NODE\_OPTIONS=--openssl-legacy-provider to the build script as a quick patch. Then you upgrade webpack and related loaders to versions compatible with OpenSSL 3.0 and remove the flag.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:46:36.765679+00:00— report_created — created