Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all versions of an npm module?

Tags:

node.js

npm

In order to see all the versions of a node module [webpack], I have executed below command in windows command prompt

npm view webpack versions

This command only displays first 100 versions and later displays "331 more" text.

How will I be able to list all versions?

like image 819
refactor Avatar asked Jan 01 '17 13:01

refactor


People also ask

What does npm view do?

Description. This command shows data about a package and prints it to stdout. The default version is "latest" if unspecified. "Person" fields are shown as a string if they would be shown as an object.

How to check installed version of a package in NPM?

Note: The npm list command doesn’t only show the installed version of packages, but also their dependencies (version). For globally installed packages, you can use the npm list -g command. Installed version of a particular package

What is the difference between NPM list and NPM view?

npm list - returns versions of all modules and dependencies. npm view <package> version, goes to the npm remote registry, not local filesystem... @AlexanderMills True, but having it here avoids another search for that. Btw, npm v, npm info and npm show are all alias of npm view.

What does NPM list --depth=0 mean?

npm list --depth=0 - returns versions of all installed modules without dependencies. npm list - returns versions of all modules and dependencies. npm view <package> version, goes to the npm remote registry, not local filesystem... @AlexanderMills True, but having it here avoids another search for that.

What is NPM ls command in Linux?

The npm ls command helps us to list (view) all versions of installed packages and their dependencies in the terminal.


4 Answers

Usually I do this if I want to see all versions

npm view webpack versions --json
like image 198
Sumeet Kumar Yadav Avatar answered Oct 21 '22 08:10

Sumeet Kumar Yadav


This is pretty much the same but won't list alpha or beta releases

npm show webpack@* version
like image 37
danday74 Avatar answered Oct 21 '22 09:10

danday74


with yarn its just yarn info react-dnd versions, you can leave versions off for a lot of other info

like image 30
russiansummer Avatar answered Oct 21 '22 09:10

russiansummer


you can view the available versions of any package using npm show <package_name> versions

for webpack use npm show webpack versions

like image 28
kamula Avatar answered Oct 21 '22 09:10

kamula