解决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"

结果:

相关文章
|
3月前
|
算法 JavaScript
Error: error:0308010C:digital envelope routines::unsupported
# 报错 (node:16863) [DEP_WEBPACK_CONFIGURATION_OPTIMIZATION_NO_EMIT_ON_ERRORS] DeprecationWarning: optimization.noEmitOnErrors is deprecated in favor of optimization.emitOnErrors (Use `node --trace-deprecation ...` to show where the warning was created) (node:16863) [DEP_WEBPACK_COMPILATION_OPTIMIZE_C
109 1
|
1月前
|
JavaScript 算法 Linux
【vue报错】error:0308010C:digital envelope routines::unsupported
【vue报错】error:0308010C:digital envelope routines::unsupported
47 3
|
9月前
|
缓存 PHP
Composer 报错 Error while processing content unencoding: Unknown failure within ...
Composer 报错 Error while processing content unencoding: Unknown failure within ...
141 0
|
21天前
|
物联网
BLE 0x3e HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH
BLE 0x3e HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH
11 0
|
13天前
|
JavaScript 算法 Windows
95% emitting CompressionPlugin ERROR Error: error:0308010C:digital envelope routines::unsupported
95% emitting CompressionPlugin ERROR Error: error:0308010C:digital envelope routines::unsupported
|
18天前
|
人工智能 JavaScript 算法
Vue 报错 error:0308010C:digital envelope routines::unsupported
Vue 报错 error:0308010C:digital envelope routines::unsupported
|
5月前
|
JavaScript 安全 网络安全
Node: opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error‘ ]异常处理
Node: opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error‘ ]异常处理
571 0
|
3月前
nodejs17/18版本报错:digital envelope routines::unsupported
nodejs17/18版本报错:digital envelope routines::unsupported
53 0
|
4月前
|
JavaScript 内存技术
解决node.js版本过高报错问题(Error: error:0308010C:digital envelope routines::unsupported)
解决node.js版本过高报错问题(Error: error:0308010C:digital envelope routines::unsupported)
78 0
解决node.js版本过高报错问题(Error: error:0308010C:digital envelope routines::unsupported)
|
5月前
activeError: error:0308010C:digital envelope routines::unsupported
activeError: error:0308010C:digital envelope routines::unsupported
28 0