Home > Blockchain >  What is the differences
What is the differences

Time:03-13

What is the differences

--force, or --legacy-peer-deps what is the differences between these two commonds.

CodePudding user response:

Since NPM v7 now installs peerDependencies by default. The --legacy-peer-deps flag was introduced with v7 as a way to bypass peerDependency auto-installation; it tells NPM to ignore peer deps and proceed with the installation anyway. This is how things used to be with NPM v4 thru v6.

You can read well written answer about above here: What does npm install --legacy-peer-deps do exactly? When is it recommended / What's a potential use case?

on the other hand, --force will simply force npm to redownload all dependencies.

  • Related