Почему в Node.js может возникать ошибка "error:0308010C envelope routines::unsupported"?
При запуске моего проекта на Node.js столкнулся с ошибкой "error:0308010C envelope routines::unsupported". Ошибка возникает в определенном участке кода, который касается криптографических операций. В частности, проблема возникает при попытке запуска webpack в режиме разработки. Я пытался обновить зависимости и проверить версии Node.js, но это не решило проблему.
[1] Error: error:0308010C:digital envelope routines::unsupported
[1] at new Hash (node:internal/crypto/hash:69:19)
[1] at Object.createHash (node:crypto:133:10)
[1] at module.exports (/home/codervadim/message-project/client/node_modules/webpack/lib/util/createHash.js:135:53)
[1] at NormalModule._initBuildHash (/home/codervadim/message-project/client/node_modules/webpack/lib/NormalModule.js:417:16)
[1] at handleParseError (/home/codervadim/message-project/client/node_modules/webpack/lib/NormalModule.js:471:10)
[1] at /home/codervadim/message-project/client/node_modules/webpack/lib/NormalModule.js:503:5
[1] at /home/codervadim/message-project/client/node_modules/webpack/lib/NormalModule.js:358:12
[1] at /home/codervadim/message-project/client/node_modules/loader-runner/lib/LoaderRunner.js:373:3
[1] at iterateNormalLoaders (/home/codervadim/message-project/client/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
[1] at iterateNormalLoaders (/home/codervadim/message-project/client/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
[1] /home/codervadim/message-project/client/node_modules/react-scripts/scripts/start.js:19
[1] throw err;
[1] ^
[1]
[1] Error: error:0308010C:digital envelope routines::unsupported
[1] at new Hash (node:internal/crypto/hash:69:19)
[1] at Object.createHash (node:crypto:133:10)
[1] at module.exports (/home/codervadim/message-project/client/node_modules/webpack/lib/util/createHash.js:135:53)
[1] at NormalModule._initBuildHash (/home/codervadim/message-project/client/node_modules/webpack/lib/NormalModule.js:417:16)
[1] at /home/codervadim/message-project/client/node_modules/webpack/lib/NormalModule.js:452:10
[1] at /home/codervadim/message-project/client/node_modules/webpack/lib/NormalModule.js:323:13
[1] at /home/codervadim/message-project/client/node_modules/loader-runner/lib/LoaderRunner.js:367:11
[1] at /home/codervadim/message-project/client/node_modules/loader-runner/lib/LoaderRunner.js:233:18
[1] at context.callback (/home/codervadim/message-project/client/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
[1] at /home/codervadim/message-project/client/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
[1] opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
[1] library: 'digital envelope routines',
[1] reason: 'unsupported',
[1] code: 'ERR_OSSL_EVP_UNSUPPORTED'
[1] }
[1]
[1] Node.js v18.20.3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Какова причина возникновения этой ошибки? Как можно ее исправить? Может ли это быть связано с устаревшими версиями зависимостей или несовместимостью с OpenSSL?