Fixing 'Digital Envelope Routines Unsupported' Issue on Apple Silicon Processors

Published on · Updated on
1 min read.
Tags: Node.js

If you use Node tooling on Apple Silicon and see:

error:0308010C:digital envelope routines::unsupported

The chip is not the cause. It is an OpenSSL compatibility mismatch: an older Webpack 4 build running on Node 17 or newer, on any platform.

Why this happens

Node 17+ moved to OpenSSL 3, which no longer allows the md4 hash by default. Webpack 4 before 4.47 hashes with md4, so the build fails. Other older dependencies can fail the same way.

This usually appears during build commands like:

  • npm run build
  • npm run dev
  • older CRA/Webpack setups

Quick workaround command

For temporary local fix:

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

This enables legacy OpenSSL provider for that shell session.

Add to package.json scripts

If your team needs a quick shared fix:

{
  "scripts": {
    "build": "NODE_OPTIONS=--openssl-legacy-provider webpack --mode production"
  }
}

For cross-platform teams, consider using cross-env.

Better long-term fix

  • upgrade Webpack/react-scripts/tooling packages
  • use a Node LTS version compatible with your stack
  • remove legacy provider flag once dependencies are updated

Short-term flag is okay, but dependency upgrade is the proper solution.

Check your Node version

node -v

If you are on a very new Node release with older frontend tooling, this error is more likely.