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'
}
原因是版本不兼容引起的,执行以下命令即可
set NODE_OPTIONS=--openssl-legacy-provider
文章来源:https://www.toymoban.com/news/detail-518340.html
再次执行npm run serve
,即可成功文章来源地址https://www.toymoban.com/news/detail-518340.html
到了这里,关于Error error0308010Cdigital envelope routinesunsupported的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!