Is there any harm in using NPM and Yarn in the same project?

Dom Hallan picture Dom Hallan · Mar 31, 2018 · Viewed 8.7k times · Source

I have been using npm for a personal project and just recently stumbled across yarn. Would there be any harm or "intended side effects" to switching to yarn's package manager in the same project where I had been using npm?

Answer

Dave Pile picture Dave Pile · May 5, 2019

Although a few commenters here say its ok to mix both yarn and npm on the same project, after using yarn and npm and then yarn again, this is what yarn has to say about it:

warning package-lock.json found. Your project contains lock files generated by tools
other than Yarn. It is advised not to mix package managers in order to avoid resolution 
inconsistencies caused by unsynchronized lock files. To clear this warning, remove
package-lock.json.