解决Error: error:0308010C:digital envelope routines::unsupported最快速方案

简介: 解决Error: error:0308010C:digital envelope routines::unsupported最快速方案

问题描述:

       报错:Error: error:0308010C:digital envelope routines::unsupported

报错原因:

        因为 node.js V17版本中最近发布的OpenSSL3.0, 而OpenSSL3.0对允许算法和密钥大小增加了严格的限制

报错详情:

Error: error:0308010C:digital envelope routines::unsupported
   at new Hash (node:internal/crypto/hash:68:19)
   at Object.createHash (node:crypto:138:10)
   at D:\Work\MyProject\RuoYi-Vue\ruoyi-ui\node_modules\compression-webpack-plugin\dist\index.js:243:42
   at CompressionPlugin.compress (D:\Work\MyProject\RuoYi-Vue\ruoyi-ui\node_modules\compression-webpack-plugin\dist\index.js:284:9)
   at D:\Work\MyProject\RuoYi-Vue\ruoyi-ui\node_modules\compression-webpack-plugin\dist\index.js:305:12
   at _next1 (eval at create (D:\Work\MyProject\RuoYi-Vue\ruoyi-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:14:17)
   at eval (eval at create (D:\Work\MyProject\RuoYi-Vue\ruoyi-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:33:1)
   at D:\Work\MyProject\RuoYi-Vue\ruoyi-ui\node_modules\copy-webpack-plugin\dist\index.js:91:9

解决方案:

$env:NODE_OPTIONS="--openssl-legacy-provider"

结果:

相关文章
|
6月前
|
JavaScript 算法 Linux
【vue报错】error:0308010C:digital envelope routines::unsupported
【vue报错】error:0308010C:digital envelope routines::unsupported
153 3
|
3月前
Node——activeError: error:0308010C:digital envelope routines::unsupported
启动项目报错error:0308010C:digital envelope routines::unsupported,其实很简单因为node版本的原因,本地默认的版本是v20.15.0,项目是老项目默认的版本是v16.16.0;
106 2
|
6月前
|
物联网
BLE 0x3e HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH
BLE 0x3e HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH
84 0
|
3月前
|
JavaScript 前端开发
NodeJs——error:03000086:digital envelope routines::initialization error
NodeJs——error:03000086:digital envelope routines::initialization error
65 0
|
3月前
|
JavaScript 算法 数据安全/隐私保护
Vue 打包 Error: error:0308010C:digital envelope routines::unsupported
Vue 打包 Error: error:0308010C:digital envelope routines::unsupported
61 0
|
5月前
|
JavaScript 算法
“Error: error:0308010C:digital envelope routines::unsupported”启动vue项目遇到一个错误【已解决
“Error: error:0308010C:digital envelope routines::unsupported”启动vue项目遇到一个错误【已解决
98 1
Error: error:0308010C:digital envelope routines::unsupported
Error: error:0308010C:digital envelope routines::unsupported
|
5月前
|
Linux Windows
【已解决】Error: error:0308010C:digital envelope routines::unsupported
【已解决】Error: error:0308010C:digital envelope routines::unsupported
168 0
|
6月前
|
JavaScript 安全 网络安全
Node: opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error‘ ]异常处理
Node: opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error‘ ]异常处理
2879 0
|
6月前
|
人工智能 JavaScript 算法
Vue 报错 error:0308010C:digital envelope routines::unsupported
Vue 报错 error:0308010C:digital envelope routines::unsupported