ruoyi-plus框架的前端,有开发者nodejs版本比较高,所以在package.json中设置了node_options,导致低版本不支持,而报错

我的node -v显示是14的


解决办法:

删除掉package.json中对应的代码:

删除前:

"scripts": {
    "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
    "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
    "preview": "node build/index.js --preview",
    "lint": "eslint --ext .js,.vue src"
  },

删除后:

"scripts": {
    "dev": "vue-cli-service serve",
    "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
    "preview": "node build/index.js --preview",
    "lint": "eslint --ext .js,.vue src"
  },