执行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就解决了,对我有用