raineorshine / npm-check-updates

Find newer versions of package dependencies than what your package.json allows
Other
9.44k stars 329 forks source link

Update notifier reports wrong version #190

Closed gsklee closed 8 years ago

gsklee commented 8 years ago

Got this:

$ ncu -a

┌─────────────────────────────────────────────────┐
│ Update available: 2.5.2 (current: 2.5.1)        │
│ Run npm install -g npm-check-updates to update. │
└─────────────────────────────────────────────────┘

But:

$ npm ls --depth=0 -g

/Users/kaylee/.nvm/versions/node/v5.2.0/lib
├── babel-eslint@4.1.6
├── npm@3.3.12
├── npm-check-updates@2.5.4
└── semistandard@7.0.4

Looks like the version checking mechanism is bugged.

raineorshine commented 8 years ago

Interesting! It is using update-notifier directly.

sindresorhus commented 8 years ago

update-notifier is not aware of nvm and you might have two different globally installed versions of npm-check-updates. One in the nvm subshell and one in the PATH.

raineorshine commented 8 years ago

It looks like update-notifier only checks updates once a day by default. That might also have caused the discrepancy.