These commands are used to check the version of npm, you can't use it to check the version of any package.
To check the version of packages installed using npm, you can run the following command:
npm list
This will print the package name along with the version