There is a simple way of doing this.
first, go to the desired location (where the package.json is located).
and simple open package.json file as a text editor.
by this method, you can find all module versions in one place.
package.json looks like this
package.json
{
"name": "raj",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.0.1",
"connect-flash": "^0.1.1",
"dotenv": "^10.0.0",
"ejs": "^3.1.6",
"express": "^4.17.1",
"express-session": "^1.17.2",
"mysql2": "^2.2.5",
"passport": "^0.4.1",
"passport-local": "^1.0.0",
"sequelize": "^6.6.2",
"socket.io": "^4.1.2"
}
}
so thus you can read every installed dependency (modules)in your pc
i.e. "socket.io": "^4.1.2" so "socket.io" having version "4.1.2"
npm show
shows the latest in npm, not installed – Tsagana Nokhaeva