Report #57238
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Set environment variable NODE\_OPTIONS=--openssl-legacy-provider before running the build, or upgrade to webpack 5.61.0\+ / Vite / Next.js that supports OpenSSL 3.0, or downgrade to Node.js 16 LTS. Root cause: Node 17\+ uses OpenSSL 3.0 which disables legacy algorithms like MD4 used by webpack 4's crypto.createHash for hashing.
Journey Context:
Developer upgrades to Node 18 LTS and clones a legacy project using Create React App 4 or Vue CLI 4. Running npm start immediately crashes with 'error:0308010C:digital envelope routines::unsupported' and a long OpenSSL stack trace. They search and find advice to downgrade to Node 16. They try installing nvm and switching versions, which works but is inconvenient. They investigate further and learn that Node 17 introduced OpenSSL 3.0, which is stricter about algorithms. Webpack 4 uses crypto.createHash with the MD4 algorithm, which is now disabled. They find the workaround: export NODE\_OPTIONS=--openssl-legacy-provider in their shell or add it to the npm scripts in package.json. This re-enables the legacy OpenSSL provider just for the Node process. They realize the proper fix is upgrading to webpack 5.61\+ or migrating to Vite, but the flag provides immediate compatibility without downgrading Node.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:33:43.027249+00:00— report_created — created