Trending Articles

Tech Talk

Error: Error:0308010c:Digital Envelope Routines::Unsupported

Introduction

Error: error:0308010c:digital envelope routines::Unsupported – The “error:0308010C: digital is occurs when you use Node.js of version 17+ and use OpenSSL v3.0, which has some significant changes in its algorithm.

The error can be solved in the following ways.

Set the NODE_OPTIONS environment variable to –openssl-legacy-provider

Pass the –OpenSSL-legacy-provider flag to Webpack

For Create React App applications, upgrade react-scripts to v5.0.0 or higher

Downgrade the installed node.js version to 16 or less.

In addition, our experts found several possible solutions that will help you overwhelmed the error with Node.JS programs using legacy OpenSSL3. Therefore, we trust this article is the most refined place to debug this error from your syntax and the last salaried on your React project without bugs and errors.

Why this Error Occurs?

Why this Error Occurs?

Command line gears like Webpack uses the “MD4 process” to create file hashes. These file hashes are then secondhand to keep track of changes in your JavaScript files.

By default, OpenSSL type 3 didn’t enable the MD4 procedure support. If you upgraded Node.js to version 17 and above, you’d see this error when building an application using Webpack.

For example, this error appears when running a Respond request:

  • $ npm start
  • Starting the development server…
  • Error: error:0308010C:digital envelope routines::unsupported
  • Near the end of the fatal, you should see opensslErrorStack logs similar to this:
  • {opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ],
  • library: ‘digital envelope routines,’
  • reason: ‘unsupported,’
  • code: ‘ERR_OSSL_EVP_UNSUPPORTED’ }

The error stack is confusing because nothing in it points to the MD4 algorithm, which is not allowed by default in OpenSSL 3. I only found out by reading debates on GitHub.

What Causes the “0308010c:digital envelope routines::unsupported” Error?

You are likely getting this error for two main reasons:

You’re not utilizing the LTS (long-term support) version of Node JS. I’m using Node 17.0.0, which is not an LTS version of Node.

you’re using react-script with an understanding of fewer than 5

The error can also occur since you’re using Node 17.

How to Fix the “0308010c:digital envelope routines::unsupported” Error

There are at least three ways by which you can fix this error. We are going to appear at them one by one. Any of them must work for you.

Pass –openssl-legacy-provider to Webpack or the CLI Tool

In a React app, for example, you can pass –openssl-legacy-provider to start writing like this “react-scripts –openssl-legacy-provider twitch.”

That must do it. But if this flops to fix the error, proceed to the next fix. Many times, it is the lot.

Use an LTS Version of Node JS

Consider downgrading your Node version to 16.16.0 or other LTS versions.

Currently, 18.12.1 is the latest LTS form of Bulge. You can copy it from the Node JS official website or use NVM to connect it.

Upgrade React Script to Form 5+

If you’re occupied with Retort and this motionless fails to fix the mistake for you, then it’s possible a subject with your Respond script.

If you’re using a React script version of less than 5, upgrade it to version 5+.

In my case, I’m currently using react-scripts 3.4.3:

ss3

To promote react-scripts to 5+, you can do in two ways:

  • Uninstall and reinstall react-scripts
  • exposed the fatal and ran npm uninstall react-scripts
  • run npm connect react-scripts

Manually change the react script version

  • go to your package.json and change the react-script version to 5.0.2
  • delete the node_modules folder by running rm –rf node_modules
  • delete the bundle.lock.json file by consecutively rm –rf suite.lock.json
  • run npm install or yarn add, liable on the package boss you’re using,

Why Is the Error: Error:0308010C:Digital Envelope Routines::Unsupported Happening?

Why Is the Error: Error:0308010C:Digital Envelope Routines::Unsupported Happening?

This error occurs when programmers and developers create a React application using the latest Node versions and web pack tools. In addition, the same digital envelope standard error looks when developers build a request using Docker since the device implements the latest Node and LTS versions. Although this standard Node.JS might be alarming to novices and less experienced users, we must remain calm because several informal solutions exist. However, understanding what causes the digital envelope standard error is sometimes more imperative than debugging the syntax.

As a result, we recreated the syntax that exhibitions the bug, which will help you notice the mistakes. Still, the error syntax may appear different in your program, but the keys remain the same.

Creating an Open Error Stack

Developers can work on the exact text but receive a different error syntax, typical for advanced documents with complex functions. For instance, developers can install Node and the latest webpack version, but the program will show a different error with the same numerical envelope routine message.

Although debugging this error requires the same steps, knowing the complete code is essential.

This syntax shows the same error with distinct values and functions:

  • [webpack-cli] Error: error:0308010C: digital envelope routines::unconfirmed
  • at new Hash (node: internal/ crypto/ hash:67:19)
  • at Object.createHash (node:crypto:130:10)
  • at BulkUpdateDecorator.hash factory (/opt/ src/ node_modules/ webpack/ lib/ util/ createHash.js:155:18)
  • opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ],
  • library: ‘digital envelope routines.’
  • reason: ‘unsupported,’
  • code: ‘ERR_OSSL_EVP_UNSUPPORTED’.

Creating a React Document with Native Meanings

This error will likely happy when developers create a React Native project with several advanced meanings and rudiments. As a result, the Node.JS 17 or advanced versions do not recognize the webpack version 4, instigating the program to display the error without affecting other elements.

As you can see, the Node form does not locate the file’s position because it does not sustain the latest web pack. Still, the complete error syntax can be as simple or complex as possible, but the debugging principles persist. However, the setting does not always have to be critical because this error will appear with less complex syntaxes.

Conclusion

The Error: error:0308010c:digital envelope routines::unsupported occurs because Webpack used the MD4 algorithm in its build process, which is no longer supported by default in the latest Node.js version.

To resolve this error, you must upgrade Webpack to version 5, which implements its MD4 algorithm without depending on Node’s implementation. If you can’t upgrade Webpack, add the –OpenSSL-legacy-provider flag when starting the Node server.

The error is somewhat frustrating because it’s unclear what you should do, but at least the fix is easy to implement.

Also Read: 7Movierulz Ibomma – A Comprehensive Guide

Related posts