wellknow 发表于 2023-9-8 15:19:38

npm run build:prod时出错:opensslErrorStack: [ 'error:03000086:解决办法

opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'

wellknow 发表于 2023-9-8 15:25:16

解决办法:在项目根目录package.json里添加环境变量 export NODE_OPTIONS=--openssl-legacy-provider;

"scripts": {
    "dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --open",
    "build:prod": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
页: [1]
查看完整版本: npm run build:prod时出错:opensslErrorStack: [ 'error:03000086:解决办法