'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.



Solution 1:[1]

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

yarn add [email protected]

Edit:

If wanting to add to devDependencies instead:

yarn add -D [email protected]

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1