β‘ TWO strong> Simple solutions:
To install the latest version of node and reinstall the packages of the old version, run the following command.
nvm install node
To install the latest version of lts long-term-support node and reinstall the old version packages, run the following command.
nvm install lts/* --reinstall-packages-from=node
Here's a GIF to support this answer. 
Ahmad Awais Nov 14 '17 at 22:21 2017-11-14 22:21
source share