Skip to content

Instantly share code, notes, and snippets.

@closetgeekshow
Last active October 18, 2023 21:51
Show Gist options
  • Save closetgeekshow/d8ef370e8e87e517767a47d5a250fac7 to your computer and use it in GitHub Desktop.
Save closetgeekshow/d8ef370e8e87e517767a47d5a250fac7 to your computer and use it in GitHub Desktop.
Node Error: error:0308010C:digital envelope routines fix

When you try to run a project in node and you get an error like:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)

Fix it with this fix I found from NikaidouSkin42

Or you can run this command,then run "npm run build"。 it still works on Node.js 16 :

for macOS, Linux or Windows Git Bash

export NODE_OPTIONS=--openssl-legacy-provider

for Windows CMD (Command Prompt)

set NODE_OPTIONS=--openssl-legacy-provider

for Windows PowerShell

$env:NODE_OPTIONS="--openssl-legacy-provider"

No I don't understand the what or why of it, I'd love to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment