Important: This documentation covers Yarn 2. For the 1.x doc, check classic.yarnpkg.com.
Yarn
yarn addyarn binyarn cache cleanyarn config getyarn config setyarn configyarn constraints queryyarn constraints sourceyarn constraintsyarn dlxyarn inityarn installyarn linkyarn nodeyarn npm infoyarn npm loginyarn npm publishyarn npm whoamiyarn packyarn patch-commityarn patchyarn plugin importyarn plugin listyarn plugin runtimeyarn rebuildyarn removeyarn runyarn set resolutionyarn set version from sourcesyarn set versionyarn stageyarn unplugyarn upyarn upgrade-interactiveyarn version applyyarn version checkyarn versionyarn whyyarn workspaceyarn workspaces foreachyarn workspaces list

yarn unplug

Force the unpacking of a list of packages.

Usage

$> yarn unplug ...

Examples

Unplug lodash :

yarn unplug lodash

Unplug one specific version of lodash :

yarn unplug lodash@1.2.3

Details

This command will add the specified selectors to the list of packages that must be unplugged when installed.

A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via virtualFolder.

Unpacking a package isn't advised as a general tool because it makes it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).

The unplug command sets a flag that's persisted in your top-level package.json through the dependenciesMeta field. As such, to undo its effects, just revert the changes made to the manifest and run yarn install.