440

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?

4
  • See here for listing all node modules.stackoverflow.com/questions/13981938/… Commented Jan 1, 2017 at 13:57
  • 5
    This npm ls --depth=0 will list all local modules as name@version. ` Commented Jan 1, 2017 at 14:00
  • 2
    Or globals: npm -g ls --depth=0. Commented Jan 1, 2017 at 14:01
  • Possible duplicate of npm view get more items Commented Jun 6, 2018 at 14:44

5 Answers 5

674

Usually I do this if I want to see all versions

npm view webpack versions --json 
Sign up to request clarification or add additional context in comments.

6 Comments

Leaving off the --json flag formats it a bit nicer on my machine.
@Niek.. depends .. do you want incomplete for long lists, or json which gives you all.
this lists versions in their natural (numerical) order
If you want to view the release date of each version, check the "Versions" tab of the package on npmjs.com. For example: npmjs.com/package/svelte?activeTab=versions
If you want to see the release dates along with the versions, you can use the following command: npm view webpack time --json or npm view webpack time
|
65

NEW:

You now need to ask for versions instead of version

npm show webpack@* versions 

OLD:

This won't list alpha or beta releases

npm show webpack@* version 

5 Comments

what is the difference between npm show npm view and npm info ?
@AkinHwan Nothing. They are all aliases of the same thing
Yeah but requires shell-escaping. It should have been instead: npm show 'webpack@*' version
This prints versions indefinitely, even alpha versions, not sure why but maybe it's that wildcard.
this lists versions in the order in which they are listed on npm e.g. npmjs.com/package/webpack?activeTab=versions
25

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

1 Comment

There is even a better way, if you type yarn add <package>@adfadf yarn will prompt you with all the versions you can install from, you're welcome
10

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

for webpack use npm show webpack versions

Comments

2

In the root of the package/module run:

npm view . versions 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.