第一步: 直接打开package.json
第二步: 直接替换scripts的内容为下面的内容
"scripts": {"dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve","build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build","build:stage": "vue-cli-service build --mode staging","electron:serve": "vue-cli-service electron:serve","electron:build": "vue-cli-service electron:build","electron:build:win32": "vue-cli-service electron:build --win --ia32","preview": "node build/index.js --preview","lint": "eslint --ext .js,.vue src"},
大功告成, 然后 npm run dev自己试试吧.
参考帖子