Skip to content

Node.js build errorNode.js “ERR_OSSL_EVP_UNSUPPORTED” when building an older app

An app that built fine for years fails with ERR_OSSL_EVP_UNSUPPORTED after a Node.js upgrade, often on a new host or a fresh laptop. Node.js 17 moved to OpenSSL 3.0, which no longer allows some older algorithms by default. Here is what Node.js says, and the fix, or hand it over at a fixed price.

Short answer

Upgrade the build tool or the dependency that uses the old algorithm, so the app builds on current Node.js. As a temporary workaround, Node.js offers the --openssl-legacy-provider option, which you can pass through NODE_OPTIONS in the build command.

Why the build fails, and the fix

  1. 01

    A build tool uses an algorithm OpenSSL 3.0 blocks

    “it’s likely that your application or a module you’re using is attempting to use an algorithm or key size which is no longer allowed by default with OpenSSL 3.0” Node.js, Node.js 17.0.0 release notes

    The error comes from your app or one of its modules asking for an algorithm or key size that OpenSSL 3.0 no longer allows by default. In our experience it is usually an older webpack-based build, such as an old Create React App setup, running on a newer Node.js.

  2. 02

    The lasting fix: upgrade the build tooling

    “we do anticipate some ecosystem impact due to tightened restrictions on the allowed algorithms and key sizes.” Node.js, Node.js 17.0.0 release notes

    We upgrade the build tool and the packages that call the old algorithm, then confirm the build passes on the Node.js version the host uses. That removes the error instead of hiding it. Node.js expected this kind of breakage when it moved to OpenSSL 3.0.

  3. 03

    The stopgap: the legacy provider option

    “has been added to revert to the legacy provider as a temporary workaround for these tightened restrictions.” Node.js, Node.js 17.0.0 release notes

    To unblock a deploy today, add --openssl-legacy-provider to NODE_OPTIONS for the build. Node.js calls this a temporary workaround, so plan the upgrade.

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

Checked against the vendor’s docs on : Node.js 17.0.0 release notes; Node.js docs: Command-line API.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Vercel Module not found · Build failed on Netlify or Vercel

Questions

More on this error

Can we put the option in NODE_OPTIONS?

Yes. The Node.js command-line docs describe NODE_OPTIONS as a space-separated list of command-line options and list --openssl-legacy-provider among the options it allows.

Should we downgrade Node.js instead?

We don’t recommend it. Staying on an old Node.js version only postpones the problem, and your host will eventually move on, so we keep the current version and upgrade the build tools instead.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; we reply by email, usually within one business day.