Showing posts with label npm. Show all posts
Showing posts with label npm. Show all posts

Tuesday, 15 September 2020

Update Packages

NPM

how to check if you have the latest version of npm installed, and how to update it to the latest version

  1. npm -v                                   //check which version you have
  2. npm show npm version         //check what the latest version is
  3. npm install npm@latest -g    //install the latest version 
  4. npm -v                                   //check if the latest version was installed

NODE

Node is a bit more fickle for windows, i have found the best approach is to download and install the binary from node.js however, should you want to maintain multiple versions of node you will need to use a node version manager (nvm) to find one refer to the npm documentation. 


  1. node --version                   //check which version you have
  2. npm show node version    //check what the latest version is

Angular

Angular is a JavaScript front-end framework, it helps your team as a whole work consistently, increases maintainability as well as expand-ability for future versions assuming it is used wisely. By no means am I a google fan boy personally i prefer vue, but here's how to check if you have the latest version of angular


ng --version                                              //check which version you have
npm show @angular/cli version              //check what the latest version is
npm install @angular/cli @latest -g        //update to the latest version

just a caveat, its is almost always generally a better idea to uninstall an old framework before updating it.

vue.js

Vue js is my favorite frame work, because it is the simplest most straight forward to use, since i made a complete mess of my vue installation, I just removed the whole thing and started over
npm uninstall @vue/cli 


so now lets start from the beginning

npm list vue -g                                 //check if any npm global packages contain vue
npm show @vue/cli version            //check what the latest available version is
npm install @vue/cli @latest -g      //install the latest vue cli version gloallly
vue --version                                    //check which version you have