decap-cms
decap-cms copied to clipboard
CI builds are failing due to ERR_OSSL_EVP_UNSUPPORTED.
Describe the bug There is an issue with hashing algorithms in Webpack 4 and Node versions 17 and above, due to Node’s migration to OpenSSL3. It’s documented at https://github.com/webpack/webpack/issues/14532 — and all recent builds on this repo are failing due to the issue.
Builds fail with:
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 (/home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/NormalModule.js:471:10)
at /home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/NormalModule.js:503:5
at /home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/NormalModule.js:358:12
at /home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at context.callback (/home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /home/runner/work/netlify-cms/netlify-cms/node_modules/babel-loader/lib/index.js:59:71 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Example pull requests which have failed with this error:
- https://github.com/netlify/netlify-cms/pull/6498
- https://github.com/netlify/netlify-cms/pull/6496
- https://github.com/netlify/netlify-cms/pull/6492
To Reproduce
- Make a change (the changeset is not relevant)
- Open a pull request
- Observe build failure
Applicable Versions:
webpack@4nodejs@17and above
The issue above suggests the possible paths forward:
-
Remain on
webpack@4, but supply--openssl-legacy-providerto nodejs:export NODE_OPTIONS=--openssl-legacy-provider -
Upgrade to
webpack@5.
This is fixed