Search This Blog

2023/08/04

How to install npm package with different name ?

npm i <alias_name>@npm:<original_package_name>


Example1:
npm i xpress@npm:express
this will install latest version of express

Example 2:
we can specify express version to install as follows
npm i xpress@npm:express@4.17.0



package.json entry for this


"xpress": "npm:express@^4.17.0"

No comments:

Post a Comment