node:internal/crypto/hash:71 this[kHandle] = new _Hash(algorithm, xofLen); 解决方法

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

B站尚硅谷尚医通项目P101

nuxt使用npm run dev时出现:

node:internal/crypto/hash:71  this[kHandle] = new _Hash(algorithm, xofLen);                  ^Error: error:0308010C:digital envelope routines::unsupported    at Object.createHash (node:crypto:133:10)    at NormalModule._initBuildHash (D:scodeworkspaceyyghyygh_site
ode_moduleswebpacklibNormalModule.js:417:16)         at handleParseError (D:scodeworkspaceyyghyygh_site
ode_moduleswebpacklibNormalModule.js:471:10)    at D:scodeworkspaceyyghyygh_site
ode_moduleswebpacklibNormalModule.js:503:5    at D:scodeworkspaceyyghyygh_site
ode_moduleswebpacklibNormalModule.js:358:12    at D:scodeworkspaceyyghyygh_site
ode_moduleswebpack
ode_modulesloader-runnerlibLoaderRunner.js:373:3    at iterateNormalLoaders (D:scodeworkspaceyyghyygh_site
ode_moduleswebpack
ode_modulesloader-runnerlibLoaderRunner.js:214:10)    at Array.<anonymous> (D:scodeworkspaceyyghyygh_site
ode_moduleswebpack
ode_modulesloader-runnerlibLoaderRunner.js:205:4) {  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],  library: 'digital envelope routines',  reason: 'unsupported',  code: 'ERR_OSSL_EVP_UNSUPPORTED'}

b4f4fe3aedb942899c3bc97c1aba78ae.png

在发现使用set NODE_OPTIONS=–openssl-legacy-provider不好使的情况下

解决方法: 给 node.js 降版本,最好不使用17及以上版本

这里使用 node16.19.0

链接:Index of /download/release/v16.19.0/ (nodejs.org)https://nodejs.org/download/release/v16.19.0/

857c36f5e2f64c1ea7029fb83ce303e7.png

 已成功运行:

2f05ef9738be41adb155a477c9cf1d83.png

 

 

  • 9
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值