npm-check-updates icon indicating copy to clipboard operation
npm-check-updates copied to clipboard

Ignore global NPM modules that are symlinked to a local package

Open garyking opened this issue 6 years ago • 2 comments

  • node version: v12.12.0
  • npm version: 6.12.0
  • npm-check-updates version: 3.1.25

I've got a few packages on my computer, which I symlink their bin via NPM global modules, by using sudo npm install -g . in the package's dir. This creates a binary that points to the project.

When running ncu -g, it looks up the symlinked module's name and sees that my version is 1.0.0 (I never bother increasing it, since it's only me using it), while a module in NPM with the same name is some version like 2.3.4. So, ncu -g tells me it's outdated.

Instead, ncu should skip checking modules that are symlinked.

garyking avatar Oct 23 '19 18:10 garyking

I have some modules that are npm -g linked. I do not have an issue with those. Is manual symlinking standard? If not I do not think it would be wise to support it.

Ah I see. You used npm install -g ..

This feature is not currently planned due to the possibility of false positives (other symlink setups).

I recommend manually excluding local packages by adding them to the reject list in your ~/.npmrc.

raineorshine avatar Nov 15 '22 12:11 raineorshine