ruoyi-plus框架的前端,有开发者nodejs版本比较高,所以在package.json中设置了node_options,导致低版本不支持,而报错
我的node -v显示是14的
解决办法:
删除掉package.json中对应的代码:
删除前:
1 | "scripts" : { |
2 | "dev" : "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve" , |
3 | "build:prod" : "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build" , |
4 | "preview" : "node build/index.js --preview" , |
5 | "lint" : "eslint --ext .js,.vue src" |
6 | }, |
删除后:
1 | "scripts" : { |
2 | "dev" : "vue-cli-service serve" , |
3 | "build:prod" : "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build" , |
4 | "preview" : "node build/index.js --preview" , |
5 | "lint" : "eslint --ext .js,.vue src" |
6 | }, |
------------正 文 已 结 束, 感 谢 您 的 阅 读 (折雨的天空)--------------------
转载请注明本文标题和链接:《node: --openssl-legacy-provider is not allowed in NODE_OPTIONS》
发表评论