Report #103736
[bug\_fix] error:0308010C:digital envelope routines::unsupported
Upgrade the build tool \(webpack 5, Vite, Next.js, etc.\) to a version that supports OpenSSL 3, or set \`NODE\_OPTIONS=--openssl-legacy-provider\` before running the dev/build command. Node.js 17\+ uses OpenSSL 3, whose default provider is incompatible with older versions of webpack's crypto usage. The flag enables the legacy OpenSSL provider in the bundled OpenSSL library. A real fix is upgrading the toolchain; the flag is a temporary workaround.
Journey Context:
You install Node.js 18 LTS on a project that was working on Node.js 16. Running \`npm run dev\` now crashes with \`error:0308010C:digital envelope routines::unsupported\`. The stack trace points inside \`crypto.createHash\` called from webpack 4. You search the Node.js changelog and see that Node 17 switched to OpenSSL 3. The Node.js CLI docs document \`--openssl-legacy-provider\`. You verify that \`NODE\_OPTIONS=--openssl-legacy-provider npm run dev\` works, then schedule a webpack 5 migration so the project no longer needs the legacy provider.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:36:46.253657+00:00— report_created — created