0308010C:digital envelope routines::unsupported

node.js为全新版本Node.js v18.15.0。许多网站说是因为node版本过高,需要降级。

可以参考如下步骤和代码来进行。


把:

"scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build"
  },

 

改为:

修改package.json,在相关构建命令之前加入SET NODE_OPTIONS=--openssl-legacy-provider

"scripts": {
   "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
   "build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build"
},

 

保存并关闭。


posted @ 2023-03-22 18:37  Insus.NET  阅读(51)  评论(0编辑  收藏  举报