npm run serve 卡住10%
nodejs新版本引起的:digital envelope routines::unsupported
推荐:修改package.json,在相关构建命令之前加入SET NODE_OPTIONS=--openssl-legacy-provider
"scripts": {
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build"
},
这种可以一劳永逸,以后直接通过npm执行scripts里面的命令即可。不管是项目迭代,还是团队开发,这种都比较有效。
解决方案参考来自:(1条消息) nodejs新版本引起的:digital envelope routines::unsupported_yygr的博客-CSDN博客