error:0308010C:digital envelope routines::unsupported
date
Dec 27, 2022
slug
error-0308010C-digital-envelope-routines-unsupported
status
Published
tags
Bugfix
Node.js
Webpack
summary
type
Post
Problem
When I tried to build the project with
Webpack
build scriptI got the error below:
What’s wrong
The Node.js V17+ with OpenSSL 3.0 moved MD4 algorithms into OpenSSL 3.0’s legacy provider. A provider is a collection of algorithms that can be added to our application when it is required. A legacy provider contains algorithms that are unsafe security-wise and outdated. The legacy provider will not load by default.
Webpack uses some cryptographic methods based on the MD4 algorithm which is available in legacy providers for Node.js v17+ with OpenSSL 3.0.
Solution
Execute one of the commands below depending on your terminal before working with Webpack: