yarn
yarn copied to clipboard
`yarn unlink ${packageName}` doesn't work after package itself has been unlinked
Do you want to request a feature or report a bug? Report a bug
What is the current behavior?
# Link package (works)
$ cd ./my-package
$ yarn link
# Link package into project (works)
$ cd ../my-project
$ yarn link my-package
# Now I'm done with package, unlink it (works)
$ cd ../my-package
$ yarn unlink
# Unlink package from project (doesn't work)
$ cd ../my-project
$ yarn unlink my-package
yarn unlink v1.3.2
error No registered module found called "my-package"
If the current behavior is a bug, please provide the steps to reproduce. See above
What is the expected behavior? According to the docs, this should work. Currently I have to do these steps in the reverse order, like so:
# Unlink package from project
$ cd ./my-project
$ yarn unlink my-package
# Unlink package
$ cd ../my-package
$ yarn unlink
Please mention your node.js, yarn and operating system version.
macOS High Sierra, 10.13.2 (17C88)
$ node -v
v8.9.4
$ yarn -v
1.3.2
Just spent the morning debugging an issue where I had 2 repos of the same package name (one is a development workspace, the other is the upstream workspace).
-
yarn link
in my-package master -
yarn link my-package
in 3rd repo -
yarn unlink
in my-package master -
yarn unlink my-package
in 3rd repo -
yarn link
in my-package development -
yarn link my-package
in 3rd repo
Then it seems to still use the original symlink from my-package master. I'd expect it to symlink to my-package development.
I'm not sure if this is an entirely new issue, but it seems related to the issue described here.
Just stumbled across the same problem.
C:\Users\Brix>yarn -v
1.6.0
C:\Users\Brix>node -v
v8.11.2
(Win7 x64)
Any updates on this?