{
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
以上为错误提示信息,解决办法如下:
windows
在package.json运行命令的地方加上 set NODE_OPTIONS=–openssl-legacy-provider,如:
"scripts": {
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build:prod": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build"
},
mac/linux
"scripts": {
"dev": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build:prod": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build"
},
通过简单调整,解决问题。