Bootstrap FreeKB - Node.js - List node npm npx version
Node.js - List node npm npx version

Updated:   |  Node.js articles

This assumes you have installed the Node.js node, npm and npx CLIs. If not, check out my article FreeKB - Node.js - Install Node.js on Linux.

The node --version command can be used to display the version of Node.js.

~]$ node --version
v22.8.0

 

The npm --version command can be used to display the version of Node Package Manager.

~]$ npm --version
10.8.2

 

The npx --version command can be used to display the version of npx.

~]$ npx --version
10.8.2

 

Likewise, the version of npm may be returned by the npm list command with the -g or --global flag.

~]# npm --global list
/usr/local/bin/node-v22.8.0-linux-x64/lib
└── npm@10.8.2

 

If there is a new version of npm available, you may get the following notice.

npm notice New patch version of npm available! 10.8.2 -> 10.8.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.3
npm notice To update run: npm install -g npm@10.8.3
npm notice

 

As the notice suggests, the npm install command can be used to upgrade npm to the newer version.

npm install --global npm@10.8.3

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 61ce48 in the box below so that we can be sure you are a human.