npm install installation package reports errors such as ERESOLVE unable to resolve dependency tree

npm install reports an error when installing the packages we need

I am using vue.2 now and need to install a lower version of swiper

Error message : insert image description hereProcess:
Check the website At first I thought it was: the npm version was too high, I installed the 6.x npm at one time, repacked the package, but it didn’t work...

Later... I thought it was my node_modulespackage that was broken for me, so I deleted it, emmmm... a big speechless incident, npm iwhen I wanted to reinstall, I reported an error again!

insert image description here

Solution:
Copy its name and install it: npm i eslint-plugin-vue@"^8.0.3"After installation, my node_modulesfolder is back, so restart the project and try it, there is no problem, then continue to solve swiperthe problem of low version

Solution:
Add after installing the lower version of the package--legacy-peer-deps

Complete installation code:

npm i [email protected] vue-awesome-swiper -S --legacy-peer-deps

Finally, the problem can be solved:
insert image description here
Nuo, installed~


insert image description here

Guess you like

Origin blog.csdn.net/egg_er/article/details/124761431