Two versions of same npm package in Node application
问题 I'm working on a CLI tool in NodeJS that uses another NodeJs package that we develop, which is an SDK. The thing is, we just published a V2 version of that SDK, and we want to offer the CLI user a legacy mode, so they can use either the first or second version of our SDK, like so: $ cli do-stuff #execute sdk v2 Or $ LEGACY_MODE='on' cli do-stuff #execute sdk v1 My problem is that I did not found any clean way to use two versions of the same dependency in my CLI. I tried to use npm-install