Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm outdated and npm update doesn't work

Tags:

node.js

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
like image 331
Barno Avatar asked Dec 22 '13 02:12

Barno


People also ask

How do I update npm to latest version?

Go into %ProgramFiles%\nodejs\node_modules\npm and copy the file named npmrc in the new npm folder, which should be %appdata%\npm\node_modules\npm . This will tell the new npm where the global installed packages are.


1 Answers

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
like image 179
Jonathan Lonowski Avatar answered Sep 22 '22 09:09

Jonathan Lonowski