解决错误error:0308010C:digital envelope routines::unsupported at new Hash

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), :14:17) at eval (eval at create (D:\Vue\qx-ty-fore\guanli\node_modules\tapable\lib\HookCodeFactory.js:33:10), :33:1) at D:\Vue\qx-ty-fore\guanli\node_modules\copy-webpack-plugin\dist\index.js:91:9

启动脚本package.json中加入如下即可

"scripts": { "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode development" }

你可能感兴趣的:(干货,vue)