解决VUE执行项目中ERR_OSSL_EVP_UNSUPPORTED报错问题

解决VUE执行项目中ERR_OSSL_EVP_UNSUPPORTED报错问题

Ezra
2023-07-05 / 0 评论 / 983 阅读 / 正在检测是否收录...

由于node版本过高导致node执行VUE某些项目的时候会报ERR_OSSL_EVP_UNSUPPORTED
这时修改package.json,加上SET NODE_OPTIONS=--openssl-legacy-provider

"scripts": {
    "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
    "lint": "eslint --ext .js,.vue src",
    "build:prod": "vue-cli-service build",
    "build:stage": "vue-cli-service build --mode staging",
    "preview": "node build/index.js --preview",
    "new": "plop",
    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
    "test:unit": "jest --clearCache && vue-cli-service test:unit",
    "test:ci": "npm run lint && npm run test:unit"
  },
3

评论 (0)

取消