折雨的天空
node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
2023-5-23 我好笨


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"
},







发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容