pnpm unlink

Aliases: dislink

Removes links created by pnpm link <dir> and reinstalls the packages as declared.

pnpm unlink [<pkg>...]

pnpm link records each link as a link: entry in the overrides of pnpm-workspace.yaml. pnpm unlink removes those overrides, all of them or only the named ones, and then reinstalls. If no overrides are configured, it prints Nothing to unlink and stops.

Це схоже на yarn unlink, за винятком того, що pnpm повторно встановлює залежність після видалення зовнішнього посилання.

Since v12.7.0, if pnpm link <dir> added a link: dependency to package.json, pnpm unlink removes that entry too, along with the package in node_modules and its lockfile entry. A link: dependency that points to another directory is kept.

Since v12.23.0, pnpm unlink also removes file: overrides that point to a directory, which pnpm link --hard writes. It keeps file: overrides to tarballs.

Параметри#

--recursive, -r#

Видаляє зв'язування у кожному пакунку, знайденому у вкладених теках, або у кожному пакунку робочої області, якщо він виконується у робочій області.

--ignore-pnpmfile#

Don't load the hooks in .pnpmfile.cjs, including the pnpmfiles of config dependencies.

--filter <package_selector>#

Читайте більше про фільтрування.