Skip to content

yarn unlink: must yarn unlink [package] before yarn unlink despite message to the contrary #710

Open
@avaragado

Description

@avaragado

https://yarnpkg.com/en/docs/cli/unlink

The example given on that page, and the message output by yarn unlink, strongly implies you run yarn unlink and then yarn unlink [package]. But it fails:

$ cd my-package
$ yarn unlink
yarn unlink v1.3.2
success Unregistered "my-package".
info You can now run `yarn unlink "my-package"` in the projects where you no longer want to use this module.
✨  Done in 0.09s.
$ cd ../my-package-user
$ yarn unlink my-package
yarn unlink v1.3.2
error No registered module found called "my-package".
info Visit https://yarnpkg.com/en/docs/cli/unlink for documentation about this command.

To make it work, unlink in the reverse order to linking: yarn unlink my-package then yarn unlink.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions