Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade version of Webpack?

I've installed Webpack through NPM in my ASP.NET core Web project. And now version of webpack is: 2.4.1. However, I need to install the following version of webpack: 2.1.0-beta.25.

I've tried to use the following command:

npm install [email protected]

But it seems that this command is not installed a desired version of Webpack cause this command npm view webpack version shows: 2.4.1

How can I downgrade to 2.1.0-beta.25?

like image 573
StepUp Avatar asked Apr 24 '17 13:04

StepUp


3 Answers

Try

npm uninstall webpack

npm install [email protected]

or

npm uninstall webpack --save

npm install [email protected] --save
like image 116
Gaurav Paliwal Avatar answered Oct 21 '22 17:10

Gaurav Paliwal


npm view does not show the installed packages, but information from the package repository. If you omit the version, it will always show the latest version.

You can use npm ls instead:

npm ls webpack
like image 5
str Avatar answered Oct 21 '22 16:10

str


Just change the version in your **package.json** and hit npm i and it should have installed the mentioned version in package.json. for confirmation go to webpack folder in node_modules and read package.json and you should be able to see the same version. Or just do npm show webpack version and it will show you the installed version

like image 3
Jorawar Singh Avatar answered Oct 21 '22 18:10

Jorawar Singh