Daniel
Daniel

Reputation: 15433

Error: error:0308010C:digital envelope routines::unsupported in my pod

I am getting an unfamiliar error that is keeping my k8s cluster from starting when I run skaffold dev.

➜ ticketing git:(master) ✗ kubectl logs client-depl-d86b58456-tv8l2

[email protected] dev next

Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db ready - started server on http://localhost:3000 node:internal/crypto/hash:67 this[kHandle] = new _Hash(algorithm, xofLen); ^

Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:133:10) at module.exports (/app/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/app/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/app/node_modules/webpack/lib/NormalModule.js:471:10) at /app/node_modules/webpack/lib/NormalModule.js:503:5 at /app/node_modules/webpack/lib/NormalModule.js:358:12 at /app/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at Array. (/app/node_modules/loader-runner/lib/LoaderRunner.js:205:4) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }

Node.js v18.3.0

I did run this command: npx browserslist@latest --update-db, that did not solve it.

Upvotes: 1

Views: 5988

Answers (4)

Alexander Coupe
Alexander Coupe

Reputation: 1

Warning! Many other answers say to downgrade the Node.js version I had this problem yesterday and this worked for me:

Go to the package.json file in your code and edit the webpack version to this:

"webpack": "^5.64.4"

This version fixed the error.

Upvotes: 0

Socratic Programmer
Socratic Programmer

Reputation: 76

I downgraded the Node.js version I was using to v16.13.0 and so far it's working for me.

If you are using NVM (Node Version Manager), perform the installation using the commands:

  1. nvm install 16.13.0
  2. nvm use 16.13.0

Upvotes: 0

MengXian
MengXian

Reputation: 11

"start": "react-scripts --openssl-legacy-provider start"

Upvotes: 1

Daniel
Daniel

Reputation: 15433

I had to go inside the package.json file of my frontend client application and change the start script to NODE_OPTIONS=--openssl-legacy-provider next dev

Error was documented here:

https://github.com/nodejs/node/issues/40455

I hope this helps someone else.

Upvotes: 3

Related Questions