简体   繁体   中英

How do I downgrade a package in devDependencies with yarn?

I want to downgrade a package version from 3.0.1 to 3.0.0? I've tried yarn upgrade @...Also tried with --dev, but it didn't work. I wasn't able to find the answer.

You can add the desired verion number to the back of the package name like so:

yarn add packagename@3.0.0

Edit:

If wanting to add to devDependencies instead:

yarn add -D packagename@3.0.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM