node.jskubernetesskaffold

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

client@1.0.0 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.


Solution

  • 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.