Fis
Fis

Reputation: 807

How to unlink the local package?

I linked a locally developed package using NPM link command. Since then, I am not able to unlink it back.

I am on Windows 10.

I have tried:

  1. npm unlink
  2. npm remove
  3. npm uninstall
  4. Completely wipe out npm caches and global repo.

I would expect the package will be installed from the NPM network repo now, as I have:

"dependencies": {
    "package": "^version"
}

in my package.json file, but it is still installing the local linked version. Where does NPM store links?

Upvotes: 7

Views: 5513

Answers (1)

Wil Moore III
Wil Moore III

Reputation: 7194

cd $(npm root -g)
rm -rf <package>

Upvotes: 3

Related Questions