Skip to content
Latchkey

Node "error:0308010C digital envelope routines unsupported" in CI - Fix OpenSSL 3

This OpenSSL 3 error appears when an older build tool uses a hashing algorithm (often MD4) that OpenSSL 3 disabled, crashing under newer Node.

What this error means

A build (commonly older webpack) crashes in CI with Error: error:0308010C:digital envelope routines::unsupported after the runner moved to a Node version bundling OpenSSL 3.

node
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:138:10)
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines', code: 'ERR_OSSL_EVP_UNSUPPORTED'

Common causes

A tool uses an algorithm OpenSSL 3 disabled

Older webpack and similar tools default to MD4 for hashing, which OpenSSL 3 no longer allows.

The CI Node version moved to OpenSSL 3

A newer Node bundles OpenSSL 3, exposing the incompatibility that did not appear on OpenSSL 1.1.

How to fix it

Upgrade the tool that uses the bad algorithm

  1. Upgrade webpack or the offending build tool to a version that uses an allowed hash.
  2. Re-run the build.
Terminal
npm install webpack@latest

Enable the legacy provider as a stopgap

  1. Set NODE_OPTIONS to enable the OpenSSL legacy provider for the build step.
  2. Treat it as temporary while you upgrade the tool.
GitHub Actions
- run: npm run build
  env:
    NODE_OPTIONS: --openssl-legacy-provider

How to prevent it

  • Upgrade build tooling to OpenSSL 3 compatible versions and pin the CI Node version so an OpenSSL bump does not silently break the build.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →