error:03000086:digital envelope routines::initialization error

浏览: 1,027次 日期:2023年08月14日 8:47:13 作者:青格勒

前端时间升级nodejs版本到 18.17.0 ,然后总是报错如下信息

Generating browser application bundles (phase: building)...node:internal/crypto/hash:69
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at module.exports (E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\webpack\lib\NormalModule.js:471:10)
at E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\webpack\lib\NormalModule.js:503:5
at E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\webpack\lib\NormalModule.js:358:12
at E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
at E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\loader-runner\lib\LoaderRunner.js:236:3
at context.callback (E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at Object.loader (E:\work\java\ok05-AIF-ProductsDCPbranchesproductsDCP-v3.4.0.Beta-230802230802-process-integration\aif-front-end\aif-dashboard\node_modules\css-loader\dist\index.js:183:3) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
    library: 'digital envelope routines',
    reason: 'unsupported',
    code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

排查发现是NODE_OPTIONS的问题,需要切换到旧版本的NODE_OPTIONS

# 使用旧版的 OpenSSL 提供程序
set NODE_OPTIONS=--openssl-legacy-provider

# 也可以恢复到默认的 OpenSSL 提供程序
set NODE_OPTIONS=

文章链接:http://cenggel.com/nodejs/error03000086digital-envelope-routinesinitialization-error.html

版权声明:文章《error:03000086:digital envelope routines::initialization error》由青格勒编写,转载请带上文章链接。

本章内容纯属乱讲,如有雷同,纯属巧合。如有借鉴之处已表明出处。

点击任意位置关闭窗口,感谢您的支持。


打赏规则 - 为了避免对于打赏模式产生误解,说明一下几点内容:

  • 1.打赏纯粹自愿,金额不限,别太多,1块就行;
  • 2.打赏不能作为解答疑问的理由;
  • 3.打赏不能帮你做毕业设计或论文;
  • 4.打赏不能帮你做工作中的项目;
  • 5.打赏就是这不能那不能,只是单纯打赏而已。
  • 5.最后谢谢支持。
关闭
相关文章

发表评论

邮箱地址不会被公开。 必填项已用*标注