Barno
Barno

Reputation: 3331

npm outdated and npm update doesn't work

I want to check if my modules are Latest

i do: sudo npm outdated

and I have this results

Package              Current  Wanted  Latest  Location

oauth                  0.9.9   0.9.9  0.9.10  twit > oauth
require-all            0.0.3   0.0.3   0.0.8  mysql > require-all
bignumber.js           1.0.1   1.0.1   1.3.0  mysql > bignumber.js
request               2.27.0  2.27.0  2.30.0  facebook-chat > node-xmpp > node-xmpp-client > request
through                2.2.7   2.2.7   2.3.4  facebook-chat > node-xmpp > brfs > through

then i do this:sudo npm update but if I repeat sudo npm outdated i have the same results... also if I do for example Info:

Package              Current  Wanted  Latest  Location
oauth                  0.9.9   0.9.9  0.9.10  twit > oauth

Then Update

sudo npm update oauth

Then

sudo npm outdated oauth

My Result:

Package  Current  Wanted  Latest  Location
oauth      0.9.9   0.9.9  0.9.10  twit > oauth

Upvotes: 18

Views: 23279

Answers (2)

Narendra Sagadevan
Narendra Sagadevan

Reputation: 63

Check your package.json may be your packages or there there. try to install package with --save and try it will work

example : npm install [email protected] --save now try npm outdated

Upvotes: -3

Jonathan Lonowski
Jonathan Lonowski

Reputation: 123423

Your project is actually as up-to-date as it can be currently.

NPM won't simply install the Latest version of a package unless that version is also Wanted.

The resulting field 'wanted' shows the latest version according to the version specified in the package.json, [...]

And, for each that you listed, the Wanted and Current versions already match.

Package              Current  Wanted ...

oauth                  0.9.9   0.9.9 ...
require-all            0.0.3   0.0.3 ...
bignumber.js           1.0.1   1.0.1 ...
request               2.27.0  2.27.0 ...
through                2.2.7   2.2.7 ...

An attempt to force oauth to its current Latest of 0.9.10, for example, would actually be considered invalid as twit has 0.9.9 listed exactly:

"dependencies": {
  "oauth": "0.9.9"
},
$ npm ls
...
└─┬ [email protected]
  └── [email protected] invalid

npm ERR! invalid: [email protected] ...\node_modules\twit\node_modules\oauth

Upvotes: 27

Related Questions