Sometimes, It is useful to downgrade an NPM package to resolve a compatibility issue. So friends, without wasting a second let’s see how to do it.
@ below syntax, You can easily install an older version of an npm package:
npm install <package>@<version>
Let’s suppose, you had installed Axios npm package version
0.18.0 but now you want to downgrade it to
0.15.0 then you can do something like below:
npm install [email protected]
How To List All Versions Of Any NPM Package?
You might also be curious to know that how to see all versions of any NPM package. Belive me it is very very is to see all the available versions of any NPM package by running just one single command as below:
npm view <package> versions
> npm view axios versions [ '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.6.0', '0.7.0', '0.8.0', '0.8.1', '0.9.0', '0.9.1', '0.10.0', '0.11.0', '0.11.1', '0.12.0', '0.13.0', '0.13.1', '0.14.0', '0.15.0', '0.15.1', '0.15.2', '0.15.3', '0.16.0', '0.16.1', '0.16.2', '0.17.0', '0.17.1', '0.18.0', '0.18.1', '0.19.0-beta.1', '0.19.0', '0.19.1', '0.19.2', '0.20.0-0', '0.20.0' ]
That’s all for the day. We hope this article helped you to Downgrade An NPM Package.
Additionally, read our guide on How To Declare A Global Variable in Vue
Please let us know in the comments if everything worked as expected, your issues, or any questions. If you think this article saved your time & money, please do comment, share, like & subscribe. Thank you in advance 🙂 Keep Smiling! Happy Coding!