StepUp
StepUp

Reputation: 38094

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?

Upvotes: 7

Views: 55161

Answers (3)

Jorawar Singh
Jorawar Singh

Reputation: 7621

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

Upvotes: 3

str
str

Reputation: 44969

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

Upvotes: 5

Gaurav Paliwal
Gaurav Paliwal

Reputation: 1596

Try

npm uninstall webpack

npm install [email protected]

or

npm uninstall webpack --save

npm install [email protected] --save

Upvotes: 13

Related Questions