0

enter image description here

I've tried the following in order to update npm. But no commands seem to work. What should I do so I can update npm?

Vincent
  • 5,884
  • 15
  • 49
  • 90

1 Answers1

2

The npm update command updates all packages (no arguments), a specific package (with a package name as argument); in the local directory or in the global modules directory (-g argument).

As stated in the npm documentation, sometimes the npm update npm -g command doesn't work, especially if you run an old version of npm, which you are. To really update npm, run this:

$ curl https://npmjs.org/install.sh | sh
Paul Mougel
  • 16,102
  • 5
  • 54
  • 63
  • When I trie your command it says I should update node first. Is there also an .sh file to update node? – Vincent Nov 15 '13 at 20:55
  • 1
    You can use [`nvm`](https://github.com/creationix/nvm) to manage Node versions: install it, then run `$ nvm install 0.10`. – Paul Mougel Nov 15 '13 at 20:59