npm启动vue项目报错error:0308010C:digital envelope routines::unsupported的解决办法
错误截图
解决方法
package.json文件中修改dev项为set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve:
"scripts": {
"dev": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src"
},