Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:79:19) at Object.createHash (node:crypto:139:10)
this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
更新完 node 版本为 12 出现这个错误如何解决呢,
网上让大家执行 在 启动之前 export NODE_OPTIONS=--openssl-legacy-provider
还有一个办法就是 在 package.json 中 的
dependencies
和
devDependencies 中添加
增加
"compression-webpack-plugin": "6.1.2"
npm install 一下
正常启动程序即可。