当前位置:   article > 正文

Error error0308010Cdigital envelope routinesunsupported_error: error:0308010c:digital envelope routines::u

error: error:0308010c:digital envelope routines::unsupported

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

项目npm run serve时报错:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:140:10)
    at module.exports (E:\project\trunk\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (E:\project\trunk\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (E:\project\trunk\node_modules\webpack\lib\NormalModule.js:449:10)
    at E:\project\trunk\node_modules\webpack\lib\NormalModule.js:481:5
    at E:\project\trunk\node_modules\webpack\lib\NormalModule.js:342:12
    at E:\project\trunk\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (E:\project\trunk\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (E:\project\trunk\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (E:\project\trunk\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:43:16)
    at E:\project\trunk\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:79:9
    at E:\project\trunk\node_modules\graceful-fs\graceful-fs.js:115:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

在这里插入图片描述

原因是版本不兼容引起的,执行以下命令即可

set NODE_OPTIONS=--openssl-legacy-provider
  • 1

在这里插入图片描述

再次执行npm run serve,即可成功

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/623884
推荐阅读
相关标签
  

闽ICP备14008679号