Categories
JavaScript Answers

How to fix the Node.js 17.0.1 Gatsby error – “digital envelope routines::unsupported … ERR_OSSL_EVP_UNSUPPORTED” error?

Spread the love

To fix the Node.js 17.0.1 Gatsby error – "digital envelope routines::unsupported … ERR_OSSL_EVP_UNSUPPORTED" error, we use a legacy SSL provider to let us use the SSL algorithm or key size used by Gatsby.

For instance, we write

{
  "scripts": {
    "build": "export NODE_OPTIONS=--openssl-legacy-provider; gatsby build"
  }
}

in package.json rto modify the build script to set the NODE_OPTIONS environment variable to --openssl-legacy-provider to use an old version of OpenSSL to let Gatsby use an old algorithm or key size.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.