Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why "wanted" is not "latest"?

Tags:

node.js

npm

I am using npm outdated -g --depth=0 to see which globally installed packages have newer version. I am getting this:

$ npm outdated -g --depth=0
Package              Current   Wanted     Latest  Location
bower                  1.6.8    1.6.8      1.7.1
jshint                 2.8.0    2.8.0  2.9.1-rc2
jspm                 0.16.13  0.16.13    0.16.19
npm-windows-upgrade    1.0.1    1.0.1      1.2.0
typescript             1.7.3    1.7.3      1.7.5

I can not update any of those packages. npm update -g does nothing. Why Wanted field is has lower version than Latest? I am using windows 7, node 4.2.1 and npm 3.5.2

like image 561
Eggy Avatar asked Oct 19 '22 19:10

Eggy


1 Answers

Since these are global packages there is no package.json to direct their update policy. By default "wanted" version is the same as installed or "current" for global packages. That means npm update will not update them saying that they are at the most recent wanted version.

In order to update them use npm -g install .... Install will use "latest" version from the repository.

like image 92
Michał Grzejszczak Avatar answered Oct 22 '22 17:10

Michał Grzejszczak