By Nicholas Brown – Follow me on X.
You can check the version of an NPM package in your project by using the ‘list’ command as shown below.
To check the version of all NPM packages in your project (not system-wide packages), use the following command:
npm list
You can check the version of a specific package (we’ll use the Mongoose package for this example), use the following command:
Syntax: ‘npm list packagename’.
npm list mongoose
The output of that command should look like this:
└── mongoose@6.8.0