Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: error:0308010C:digital envelope routines::unsupported #35

Open
pablojordandlf opened this issue Dec 28, 2022 · 9 comments
Open

Comments

@pablojordandlf
Copy link

Hey! When running the project in dev I get the following error:

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at BulkUpdateDecorator.hashFactory (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:133790:18)
at BulkUpdateDecorator.update (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:133692:50)
at OriginalSource.updateHash (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack-sources2\index.js:1:19148)
at NormalModule._initBuildHash (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65772:17)
at handleParseResult (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10)
at C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65928:4
at processResult (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65651:11)
at C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65711:5
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at BulkUpdateDecorator.hashFactory (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:133790:18)
at BulkUpdateDecorator.update (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:133692:50)
at OriginalSource.updateHash (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack-sources2\index.js:1:19148)
at NormalModule._initBuildHash (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65772:17)
at handleParseResult (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10)
at C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65928:4
at processResult (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65651:11)
at C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65711:5
node:internal/crypto/hash:71
this[kHandle] = new _Hash(algorithm, xofLen);
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at BulkUpdateDecorator.hashFactory (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:133790:18)
at BulkUpdateDecorator.update (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:133692:50)
at OriginalSource.updateHash (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack-sources2\index.js:1:19148)
at NormalModule._initBuildHash (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65772:17)
at handleParseResult (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10)
at C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65928:4
at processResult (C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65651:11)
at C:\Users\pablo\Documents\GitHub\portfolio_website\node_modules\next\dist\compiled\webpack\bundle5.js:65711:5 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

@Andres22-sys
Copy link

I have the same issue, I've been trying to figure it out for about a day!!!

@zakjanzi
Copy link

I got this same issue when I first cloned the site and wanted to run it locally. Turns out this is a node version issue.
This helped me understand and solve this problem: https://itsmycode.com/error-digital-envelope-routines-unsupported/

(Although it might not be best practice, so take it with a grain of salt).

@kewlkarthik
Copy link

I have the same issue :(

@turtlelord-17
Copy link

same issue. cant move on with the project.

@AJ-KUSHWAH
Copy link

same issue is arising with me.

@kevinbism
Copy link

I resolved upgrading the nextjs version. Try it. It works for me.

@leanhvu21042001
Copy link

leanhvu21042001 commented Sep 27, 2023

I have fixed it.

Just change your node-version.
Change to node version 16, it should work well on that version

You can use NVM

@websam101
Copy link

For those who is still having this issue, you can just modify the package.json file.

Linux:

  "scripts": {
    "dev": "export NODE_OPTIONS=--openssl-legacy-provider && next dev",
    "build": "export NODE_OPTIONS=--openssl-legacy-provider && next export",
    "start": "export NODE_OPTIONS=--openssl-legacy-provider && next start"
  },

Windows:

  "scripts": {
    "dev": "set NODE_OPTIONS=--openssl-legacy-provider && next dev",
    "build": "set NODE_OPTIONS=--openssl-legacy-provider && next export",
    "start": "set NODE_OPTIONS=--openssl-legacy-provider && next start"
  },

or by adding cross-env npm install cross-env

  "scripts": {
    "dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider && next dev",
    "build": "cross-env NODE_OPTIONS=--openssl-legacy-provider && next export",
    "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider && next start"
  },

@markogra
Copy link

@websam101 Thanks, works well for windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants