vue-cli自定義創(chuàng)建項目eslint依賴沖突解決方式
創(chuàng)建項目步驟

概覽:

在安裝 npm安裝時會報錯
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @vue/eslint-config-standard@6.1.0 npm ERR! Found: eslint-plugin-vue@8.7.1 npm ERR! node_modules/eslint-plugin-vue npm ERR! dev eslint-plugin-vue@"^8.0.3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0 npm ERR! node_modules/@vue/eslint-config-standard npm ERR! dev @vue/eslint-config-standard@"^6.1.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: eslint-plugin-vue@7.20.0 npm ERR! node_modules/eslint-plugin-vue npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0 npm ERR! node_modules/@vue/eslint-config-standard npm ERR! dev @vue/eslint-config-standard@"^6.1.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
依賴沖突原因:
@vue/eslint-config-standard@6.1.0 依賴于 eslint-plugin-vue 的 ^7.0.0 版本,但是項目中安裝了更高版本的eslint-plugin-vue

解決方式:
降級eslint-plugin-vue到@vue/eslint-config-standard支持的版本
npm install eslint-plugin-vue@^7.0.0
解決后:

再進行npm安裝,就能成功
npm i --registry https://registry.npmmirror.com vant@latest-v2 -S

總結(jié)
到此這篇關于vue-cli自定義創(chuàng)建項目eslint依賴沖突解決方式的文章就介紹到這了,更多相關vue-cli eslint依賴沖突解決內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
解決Vue2.0 watch對象屬性變化監(jiān)聽不到的問題
今天小編就為大家分享一篇解決Vue2.0 watch對象屬性變化監(jiān)聽不到的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-09-09
Vue使用pinia管理數(shù)據(jù)pinia持久化存儲問題
這篇文章主要介紹了Vue使用pinia管理數(shù)據(jù)pinia持久化存儲問題,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-03-03
vue+element 模態(tài)框表格形式的可編輯表單實現(xiàn)
這篇文章主要介紹了vue+element 模態(tài)框表格形式的可編輯表單實現(xiàn),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2019-06-06

