opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error‘ ] error:03080

执行npm run build所遇问题:error:0308010C:digital envelope routines::unsupported
问了GPT说是note版本过低,可明明是最新版本。
如图
在这里插入图片描述
找了很多解决方案:

方案一降低note的版本。

方案二:在package.json中讲script方法改为这样
在这里插入图片描述

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

然后直接在终端执行这句

$env:NODE_OPTIONS=“–openssl-legacy-provider”

然后npm run serve就解决了,对我有用

猜你喜欢

转载自blog.csdn.net/qq_44727672/article/details/131881559