How to update nodejs and npm [Node Package Manager] ?

NodeJS and NPM  Update

Step-1: First check the node and npm versions

  • node -v
  • npm -v
  • Step-2: npm install globally

  • npm install npm -g
  • Step-3: Check the npm version now

  • npm -v
  • Step-4: Again install for cross verification.

  • npm install npm -g
  • Step-5: Clear the npm cache to use forcefully.

  • npm cache clean -f
  • Step-6: Install the node globally

  • npm install -g n
  • Step-7: Check the stable release

  • n stable
  • Step-8: Now check npm and nodejs versions.

  • node -v
  • npm -v
  • List to show all globally installed packages in npm

    C:\Users\sivaprabug>npm list -g –depth=0

    The output showns like below

    +– bower@1.8.0
    +– gulp@3.9.1
    +– npm@3.10.9