use npm version code example Example 1: npm version npm install -g npm@latest Example 2: find npm version npm --version