Build issue “error:0308010C:digital envelope routines::unsupported”

Yiğit 👨🏻‍💻
2 min readDec 16, 2022

--

Hello everyone, today I ran into a problem while building my project. The problem was something like this after I got the build…

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (/opt/atlassian/pipelines/agent/build/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/opt/atlassian/pipelines/agent/build/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/opt/atlassian/pipelines/agent/build/node_modules/webpack/lib/NormalModule.js:471:10)
at /opt/atlassian/pipelines/agent/build/node_modules/webpack/lib/NormalModule.js:503:5
at /opt/atlassian/pipelines/agent/build/node_modules/webpack/lib/NormalModule.js:358:12
at /opt/atlassian/pipelines/agent/build/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/opt/atlassian/pipelines/agent/build/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/opt/atlassian/pipelines/agent/build/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /opt/atlassian/pipelines/agent/build/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at context.callback (/opt/atlassian/pipelines/agent/build/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /opt/atlassian/pipelines/agent/build/node_modules/cache-loader/dist/index.js:147:7
at /opt/atlassian/pipelines/agent/build/node_modules/graceful-fs/graceful-fs.js:61:14
at FSReqCallback.oncomplete (node:fs:197:23) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v18.12.1

When I researched the problem a bit, I read that there are usually two different solutions. When I researched the problem a bit, I read that there are usually two different solutions. One of the solutions is if your Node.js version is over 16+, you need to downgrade it BUT it does not working for me.

Already I was using Node.js 16 version then I upgraded my Node.js version to latest version (v18.12.1). After I upgraded my Node.js version, I tried second solution. I edit my package.json file by adding this code“ export NODE_OPTIONS= — openssl-legacy-provider && “ your code should be like that

Solution

 "scripts": {
"serve": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode development",
"beta": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode beta",
"prod": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode production",
}

I hope your problem is solved… Cheers!

👏👏If you want to support me, you can applaud as much as you like. 👏👏

--

--

No responses yet