Report #24096
[bug\_fix] error:0308010C:digital envelope routines::unsupported / ERR\_OSSL\_EVP\_UNSUPPORTED
Set the environment variable NODE\_OPTIONS=--openssl-legacy-provider \(e.g., export NODE\_OPTIONS=--openssl-legacy-provider in Unix or set NODE\_OPTIONS=--openssl-legacy-provider in Windows\) before running the build, or upgrade webpack to 5.61.0\+ and react-scripts to 5.0.1\+ which include OpenSSL 3.0 compatibility. Root cause: Node.js 17\+ bundles OpenSSL 3.0, which changes the default hash algorithms \(MD4\) used by webpack 4 and older crypto.createHash calls, breaking builds.
Journey Context:
You upgrade to Node 18 LTS and attempt to run your existing React application \(created with Create React App 4 or using Webpack 4\). The build immediately crashes with 'error:0308010C:digital envelope routines::unsupported'. The error stack points to crypto.js inside webpack. You search online and discover Node 17 introduced OpenSSL 3.0, which disables legacy algorithms by default. You consider downgrading Node \(not ideal\). You find the Node.js 17 release notes mentioning the --openssl-legacy-provider flag. You try adding export NODE\_OPTIONS=--openssl-legacy-provider to your .zshrc and reloading the terminal. The build now succeeds. Later, you upgrade react-scripts to version 5.0.1 which includes a fix for OpenSSL 3.0 compatibility, allowing you to remove the legacy provider flag.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:51:19.682119+00:00— report_created — created