Installing a specific version of an npm package, something that will help to solve compatibility issues.
You can use the below command for installing a specific version of a npm package.
npm install <package>@<version>
Below will install the current verion of the axios.
npm install axios
If you want to install the verions 0.22.0 you can use the below.
npm install email@example.com
For installing it as global package, run the following command:
npm install -g firstname.lastname@example.org
For listing all the previous version of a package. You can do it with
npm view <package> versions.
npm view axios versions
For tree-structured list of all your locally installed packages, including their dependencies, run the following command:
For viewing the packages inserted globally, run the following command:
npm list -g
For viewing the verion of a specific package, run the following command:
npm list axios