npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve

Error when installing less-loader

 

 Solution: Add after the command line 

–legacy-peer-deps

 --legacy-peer-deps role

 

In NPM v7, peerDependencies are now installed by default.

In many cases, this results in a version conflict which interrupts the installation process.

The --legacy-peer-deps flag was introduced in v7 to bypass the automatic installation of peerDependency; it tells NPM to ignore the same modules but different versions of the modules introduced in the project and continue to install, ensuring that each import The dependencies of different versions of the modules used by itself coexist.

Guess you like

Origin blog.csdn.net/m0_64351096/article/details/126991476