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 firstname.lastname@example.org
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. Believe 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:
- How to Select Data Between Two Dates in MySQL
- Error After php artisan config:cache In Laravel
- Specified Key Was Too Long Error In Laravel
- AJAX PHP Post Request With Example
- How To Use The Laravel Soft Delete
- How To Add Laravel Next Prev Pagination
- cURL error 60: SSL certificate problem: unable to get local issuer certificate
- Difference Between Factory And Seeders In Laravel
- Laravel: Increase Quantity If Product Already Exists In Cart
- How To Calculate Age From Birthdate
- How to Convert Base64 to Image in PHP
- Check If A String Contains A Specific Word In PHP
- Dynamically Populate A Select Field’s Choices In ACF
- How To Find Duplicate Records in Database
- Difference between del, remove and pop on lists
- How To Solve NPM Start Script Missing Error
- Easy Ways To Convert String To Int Python
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!