npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

On-demand aliasing on install


Sometimes you want different versions of the same module installed in the same repo. For example, bootstrap-vue needs access to vue@~2.5.16 and vue@~2.5.17-beta.0 while running tests.


One option is to publish scoped packages for these (i.e. vue-latest and vue-beta).

Instead, it would be nice to alias a package on install that references the specific version. For example,

"devDependencies": {
"vue-beta": "npm:vue@~2.5.17-beta.0",
"vue-latest": "npm:vue@~2.5.16",

where vue@~2.5.17-beta.0 is installed as vue-beta and vue@~2.5.16 gets installed as vue-latest.


There’s already been a PR for this for a looong time, but it’s pending some work.

Nice! Thank you @zkat!