npm updgraDE PACKAGES code example
Example 1: how to update my package.json
npm install -g npm-check-updates
/after install run following:
ncu -u
//Then this:
npm update
Example 2: npm update all
npm update --save
Example 3: npm downgrade package
npm view <package> versions // lets see what versions of package are available
npm install <package>@<version> // install desired version. Remember about flags which maybe you want to use (eg. -g for global)
// example for package 'express'
npm install [email protected]