MAC系统node:internal/crypto/hash:80 this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHas

node:internal/crypto/hash:80
  this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:80:19)
    at Object.createHash (node:crypto:139:10)
    at getFileName (/Users/c0015/Desktop/代码/低代码/mp-galaxy/node_modules/webpack-theme-color-replacer/src/Handler.js:33:38)
    at Handler.handle (/Users/c0015/Desktop/代码/低代码/mp-galaxy/node_modules/webpack-theme-color-replacer/src/Handler.js:23:26)
    at /Users/c0015/Desktop/代码/低代码/mp-galaxy/node_modules/webpack-theme-color-replacer/src/index.js:22:26
    at _next1 (eval at create (/Users/c0015/Desktop/代码/低代码/mp-galaxy/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
    at eval (eval at create (/Users/c0015/Desktop/代码/低代码/mp-galaxy/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:29:1)
    at /Users/c0015/Desktop/代码/低代码/mp-galaxy/node_modules/copy-webpack-plugin/dist/index.js:91:9 {
  opensslErrorStack: [
    'error:03000086:digital envelope routines::initialization error',
    'error:0308010C:digital envelope routines::unsupported'
  ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.12.2
error Command failed with exit code 1.

报错原因 node.js版本太高了
在这里插入图片描述
看以前是node 16版本 而自己设置是node 20
电脑有安装多版本使用
nvm use 16.17.0
切换低版本
再次运行

yarn serve

即可正常启动了,
在这里插入图片描述

还保存其他异常可以将原来 的 yarn.lock / node_modules 删掉重新
yarn install 然后 yarn serve
即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值