How does NPM handle version conflicts?

jwerre picture jwerre · Feb 9, 2017 · Viewed 12.6k times · Source

Since NPM version 3 node modules and dependencies are all installed at the same root level. But what if I install two modules that depend on two different versions of the same module? For instance, if I install async npm i [email protected], which requires lodash version 4.14.0, then I install yeoman npm i [email protected], which requires lodash version version 3.2.0, how does npm resolve this conflict?

Answer