問題原因:
nodejs版本太高(nodejs v17版本發(fā)布了openSSL3.0對短發(fā)和密鑰大小增加了更為嚴(yán)格的限制,nodejs v17之前版本沒有影響,但之后的版本會(huì)出現(xiàn)這個(gè)錯(cuò)誤,物品的node版本是20.9.0)
解決方式:(僅windows)
在 package.json 的 scripts 中新增文章來源:http://www.zghlxwxcb.cn/news/detail-742744.html
SET NODE_OPTIONS=--openssl-legacy-provider &&
"scripts": {
"dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
},
npm run dev重新啟動(dòng)即可文章來源地址http://www.zghlxwxcb.cn/news/detail-742744.html
到了這里,關(guān)于【npm run dev 報(bào)錯(cuò):error:0308010C:digital envelope routines::unsupported】的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!