You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

unlink.md 1.3 kB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. id: docs_cli_unlink
  3. guide: docs_cli
  4. layout: guide
  5. ---
  6. {% include vars.html %}
  7. <p class="lead">Unlink a previously created symlink for a package.</p>
  8. To remove a symlinked package created with [`yarn link`]({{url_base}}/docs/cli/link), `yarn unlink` can be used.
  9. ##### `yarn unlink` <a class="toc" id="toc-yarn-unlink" href="#toc-yarn-unlink"></a>
  10. Run `yarn unlink` in the folder that was previously used to create a link.
  11. ##### `yarn unlink [package]`<a class="toc" id="toc-yarn-unlink-package" href="#toc-yarn-unlink-package"></a>
  12. To unlink a package that was symlinked during development in your project, simply
  13. run `yarn unlink [package]`. You will need to run `yarn install --check-files` to re-install
  14. the package that was linked, for more info [see issue 1957](https://github.com/yarnpkg/yarn/issues/1957).
  15. Continued example from the [`yarn link`]({{url_base}}/docs/cli/link) documentation: assume two folders
  16. `react` and `react-relay` that are located next to each other with `react` linked
  17. into the `react-relay` project:
  18. ```sh
  19. $ cd react
  20. $ yarn unlink
  21. yarn link vx.x.x
  22. success Unregistered "react".
  23. ```
  24. ```sh
  25. $ cd ../react-relay
  26. $ yarn unlink react
  27. yarn link vx.x.x
  28. success Unregistered "react".
  29. ```
  30. Also see:
  31. - [`yarn link`]({{url_base}}/docs/cli/link): symlink a package for local development.

js yarn包管理组件依赖分析

Contributors (1)