update npm and node version code example Example 1: update npm npm install -g npm@latest Example 2: update nodejs version npm cache clean -f