Chron's avatar
Level 7

How to downgrade a package in npm?

I want to downgrade moment2.24.0 to 2.22.2 because of conflict with other package. Moment is already installed when I did npm run install so I'm hesitating, I may break the system.

0 likes
1 reply
Chron's avatar
Chron
OP
Best Answer
Level 7
npm install <package>@<version>

removes the current version and replaces it by the newly installed version

Please or to participate in this conversation.