DEV Community

Richard Francis
Richard Francis

Posted on

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

CAUSES

  1. NODE VERSION: Using Node version 17 and above,
  2. Docker: Building with docker pulls the latest version of node.js by default {Node:LTS}.

The problem here is Node.js 17's push to use OPENSSL 3, changing the code required for the initialisation context of the md family.

HOW TO FIX

  1. Downgrade Node.js
  • You can use nvm (Node Version Manager) for your Os and run
    nvm install 16.15.1
    nvm use 16.15.1

  • While for docker you can directly supply the version of Node.js to use.
    use Node:16.15.1

  1. Enable Legacy Support Get passed the error by enabling support for legacy OpenSSL versions.
  • Update ENV Variable
    export NODE_OPTIONS=--openssl-legacy-provider
    Using your terminal Run this on macOs, Linux or Windows Git Bash.

  • Updating the package.json file
    "start": "react-scripts start"
    Update to:
    "start": "react-scripts --openssl-legacy-provider start"

Top comments (0)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay