How to solve error:0308010C:digital envelope routines::unsupported in NodeJS

Error:0308010C:digital envelope routines::unsupported

This article will show you in detail why the error:0308010C:digital envelope routines::unsupported appears and the solutions for it. Let’s read it now.

The reason of the error:0308010C:digital envelope routines::unsupported

In Node.js v17, a security flaw of the SSL provider was fixed. This fix had a similar effect on the SSL packages. If you don’t downgrade the SSL packages in your package.json before attempting to use SSL in Node.js in version 17 or later, you’ll get this error.

This error appears when you initialize a project. The leading cause of the error is that Nodejs in your project is not working correctly. In the next part of the article, we will show you some solutions to this problem. Pay attention to the article.

How to fix the error:0308010C:digital envelope routines::unsupported

Downgrade your Nodejs

NodeJS is an open-source and cross-stage JavaScript runtime climate utilized to run web applications beyond the client’s program. Ryan Dahl developed this platform in 2009, and its asynchronous event-driven model makes it ideal for data-intensive applications. Here the error may be because you are using version 17+, and you need to downgrade it to version 16+ so that the program can work properly.

You can reinstall the most recent LTS Node.js version by downloading the required version and installing it on your computer from their official website.

Or you can also reinstall the version of Nodejs using NVM by going to the manufacturer’s git link on your machine. After you download and install the Nodejs 16 version, the program will run an initialization command usual way.

Run Terminal

Or you can also refer to running the set NODE_OPTIONS command on your computer so that the program can reconfigure and run normally. Here are the commands on Mac, Linux, and Windows, depending on the operating system you are installing for your machine.

Linux or macOS:

export NODE_OPTIONS=--OpenSSL-legacy-provider


set NODE_OPTIONS=--OpenSSL-legacy-provider

Run this command on your terminal, and error:0308010C: digital envelope routines::unsupported will no longer appear. Node.JS is one of the most popular platforms today for server-side network application development. This is a potent coding tool. Wish you success with the methods in the article.


In summary, the article has shown you how to fix the error:0308010C:digital envelope routines::unsupported, but I recommend you to use the run command because it will prevent version conflicts between member of the development team.

Maybe you are interested:

Leave a Reply

Your email address will not be published. Required fields are marked *