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

Fix to work with latest versions of NodeJS #18

Open
moonlight16 opened this issue Sep 12, 2023 · 0 comments
Open

Fix to work with latest versions of NodeJS #18

moonlight16 opened this issue Sep 12, 2023 · 0 comments

Comments

@moonlight16
Copy link

I started with latest version of Node.js v18.17.1 and hit this issue:

❯ sudo npm run dev

> [email protected] dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/Users/j/ResilioSync/github.com/adrianhajdin/projects_realestate/node_modules/next/dist/compiled/webpack/bundle5.js:138971:18)
    at BulkUpdateDecorator.digest (/Users/j/github.com/adrianhajdin/projects_realestate/node_modules/next/dist/compiled/webpack/bundle5.js:138906:21)
    at getHash (/Users/j/github.com/adrianhajdin/projects_realestate/node_modules/next/dist/compiled/webpack/bundle5.js:101615:45)
    at getLongModuleName (/Users/j/github.com/adrianhajdin/projects_realestate/node_modules/next/dist/compiled/webpack/bundle5.js:101695:25)
    at /Users/j/github.com/adrianhajdin/projects_realestate/node_modules/next/dist/compiled/webpack/bundle5.js:102180:24
    at assignNames (/Users/j/ResilioSync/github.com/adrianhajdin/projects_realestate/node_modules/next/dist/compiled/webpack/bundle5.js:101894:22)
    at /Users/j/github.com/adrianhajdin/projects_realestate/node_modules/next/dist/compiled/webpack/bundle5.js:102173:28
    at Hook.eval [as call] (eval at create (/Users/j/ResilioSync/github.com/adrianhajdin/projects_realestate/node_modules/next/dist/compiled/webpack/bundle5.js:33818:10), <anonymous>:7:1) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.17.1

To fix this I either had to downlevel NodeJS to v16. OR run legacy SSL as suggested here:

https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

This project ought to be fixed to work with the latest version of NodeJS.

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

No branches or pull requests

1 participant