Version management with 'n'
upgrade global packages
Check for outdated global packages
npm outdated -g --depth=0Update outdated packages
npm update -gfor all packages ornpm update -g some-package-namefor a specific package.
Upgrading Node
These are steps for upgrading node.js using the node version manager 'n'. Note that 'n' does not work with Windows - this is for Mac only.
Check the current version
node -vClean out the npm cache
sudo npm cache clean -fInstall node helper (n) globally using following command.
sudo npm install -g nOnce 'n' is installed, upgrade to the latest version of Node.js supported by AWS Lambda (currently 8.10)
sudo n 8.10After upgrading, confirm the version is now 8.10
node -v