PlainError

error:0308010C:digital envelope routines::unsupported (ERR_OSSL_EVP_UNSUPPORTED)

Updated 2026-11-20 · 5 fixes · expanded guide with sources · how we write fixes

TL;DRThis Node.js error means an old build tool asked OpenSSL 3 for the MD4 hash, which Node.js 17+ no longer allows by default. It almost always comes from webpack 4 (Create React App 4, older Vue CLI, Angular, Next.js 11 and earlier). Upgrade the tool for a real fix, or use the legacy OpenSSL provider as a stopgap.

Most likely cause: webpack 4 (or a tool built on it) hashing with MD4 on Node.js 17 or newer

Try first: Check your Node.js and webpack versions (node -v && npx webpack --version)

Likely causes

  1. webpack 4 (or a tool built on it) hashing with MD4 on Node.js 17 or newermost likely
  2. An old react-scripts, @vue/cli-service, @angular-devkit or next version pinned in package.jsonpossible
  3. A CI image or Docker base image that moved to a newer Node.js versionless likely

Why this happens

Node.js 17 switched from OpenSSL 1.1 to OpenSSL 3. OpenSSL 3 moves old algorithms such as MD4 into a "legacy" provider that is off by default. webpack 4 uses MD4 to hash module contents, so crypto.createHash('md4') throws error:0308010C and the build stops. Your code is fine; the build tool is old.

Which fix to choose

How to fix it

Safest first: SafeChanges settingsDangerous
  1. Check your Node.js and webpack versionsSafe

    If Node is 17 or newer and webpack is 4.x, this is your error.

    node -v && npx webpack --version
  2. Upgrade the build tool (real fix)Changes settings

    Upgrade to a version that uses webpack 5: react-scripts 5, a current Vue CLI or Vite, Angular 13+, Next.js 12+. Webpack 5.61+ also falls back to a built-in hash so it works on OpenSSL 3.

    npm install react-scripts@latest
  3. Stopgap: enable the legacy OpenSSL providerChanges settings

    Set the variable for the build command only. On macOS/Linux: NODE_OPTIONS=--openssl-legacy-provider npm start. On Windows PowerShell: $env:NODE_OPTIONS="--openssl-legacy-provider"; npm start. Remove it once you upgrade.

    NODE_OPTIONS=--openssl-legacy-provider npm run build

    ⚠ This re-enables legacy algorithms for the whole Node.js process. Use it only for local builds until you upgrade.

  4. Or pin the project to Node.js 16Changes settings

    Using nvm or nvm-windows, install Node.js 16 for this project only. Node 16 is out of support, so treat this as temporary.

    nvm install 16 && nvm use 16
  5. Fix CIChanges settings

    Pin the Node version in CI (for example node-version: 16 in actions/setup-node, or FROM node:16 in Docker) while you upgrade, so builds do not break when the image updates.

If that didn't fix it

Search the full stack trace for the package that calls createHash; a plugin with its own MD4 hashing may need its own upgrade.

When to see a technician

No technician needed; this is a project dependency issue. Ask the project's maintainer if you do not control its dependencies.

Questions people ask

Is --openssl-legacy-provider safe?
It is fine for a local build, but it turns on old, weak algorithms for the whole process. Do not set it globally on servers that handle real traffic.
Why did it start without me changing anything?
Usually Node.js was updated (by an installer, Homebrew or a CI image) to version 17 or newer, while the project still uses webpack 4.

Sources

Did this fix it? Report a problem

Related errors

All Coding errors →