Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at D:\Vue\qx-ty-fore\guanli\node_modules\compression-webpack-plugin\dist\index.js:243:42 at CompressionPlugin.compress (D:\Vue\qx-ty-fore\guanli\node_modules\compression-webpack-plugin\dist\index.js:284:9) at D:\Vue\qx-ty-fore\guanli\node_modules\compression-webpack-plugin\dist\index.js:305:12 at _next1 (eval at create (D:\Vue\qx-ty-fore\guanli\node_modules\tapable\lib\HookCodeFactory.js:33:10),
启动脚本package.json中加入如下即可
本地Windows配置
"scripts": { "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode development" }
Linux配置
"scripts": { "dev": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode development" }
或者试下
"scripts": { "dev": "NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode development" }