rror: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (D:company_projectmap-edit2fontnode_moduleswebpacklibutilcreateHash.js:135:53)
at NormalModule._initBuildHash (D:company_projectmap-edit2fontnode_moduleswebpacklibNormalModule.js:417:16)
at handleParseError (D:company_projectmap-edit2fontnode_moduleswebpacklibNormalModule.js:471:10)
at D:company_projectmap-edit2fontnode_moduleswebpacklibNormalModule.js:503:5
at D:company_projectmap-edit2fontnode_moduleswebpacklibNormalModule.js:358:12
at D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:373:3
at iterateNormalLoaders (D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:214:10)
at iterateNormalLoaders (D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:221:10)
at D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:236:3
at runSyncOrAsync (D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:130:11)
at iterateNormalLoaders (D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:232:2)
at Array.<anonymous> (D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:205:4)
at Storage.finished (D:company_projectmap-edit2fontnode_modulesenhanced-resolvelibCachedInputFileSystem.js:55:16)
at D:company_projectmap-edit2fontnode_modulesenhanced-resolvelibCachedInputFileSystem.js:91:9
node:internal/crypto/hash:71
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at module.exports (D:company_projectmap-edit2fontnode_moduleswebpacklibutilcreateHash.js:135:53)
at NormalModule._initBuildHash (D:company_projectmap-edit2fontnode_moduleswebpacklibNormalModule.js:417:16)
at handleParseError (D:company_projectmap-edit2fontnode_moduleswebpacklibNormalModule.js:471:10)
at D:company_projectmap-edit2fontnode_moduleswebpacklibNormalModule.js:503:5
at D:company_projectmap-edit2fontnode_moduleswebpacklibNormalModule.js:358:12
at D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:373:3
at iterateNormalLoaders (D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:214:10)
at Array.<anonymous> (D:company_projectmap-edit2fontnode_modulesloader-runnerlibLoaderRunner.js:205:4)
at Storage.finished (D:company_projectmap-edit2fontnode_modulesenhanced-resolvelibCachedInputFileSystem.js:55:16)
at D:company_projectmap-edit2fontnode_modulesenhanced-resolvelibCachedInputFileSystem.js:91:9
at D:company_projectmap-edit2fontnode_modulesgraceful-fsgraceful-fs.js:123: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'
}
Node.js v18.12.1
查了下原因,主要是 nodeJs V17 版本发布了 OpenSSL3.0 对算法和秘钥大小增加了更为严格的限制,nodeJs v17 之前版本没影响,但 V17 和之后版本会出现这个错误。 我的node版本是v18.12.1
在 package.json 的 scripts 中新增 SET NODE_OPTIONS=–openssl–legacy–provider
添加前:
“scripts”: {
“dev“: “vue–cli–service serve“,
“build:prod“: “vue–cli–service build“
},
添加后
“scripts”: {
“dev“: “SET NODE_OPTIONS=–openssl–legacy–provider && vue–cli–service serve“,
“build:prod“: “SET NODE_OPTIONS=–openssl–legacy–provider && vue–cli–service build”
},
原文地址:https://blog.csdn.net/Alan_Walker1/article/details/129682253
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_46096.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。