Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Req: add 'lv' command to list versions of installed top-level modules in "dependencies" format #2105

youurayy opened this Issue · 5 comments

5 participants


Normally what I do when I start a project, I keep adding modules via npm install module, and at some point I want to add all of the modules to my package.json file.

(So this could also be added to the npm init command which generates package.json, but I think having the possibility to list versions at any time and then copy&paste it to the package.json as needed, is much more versatile.)

I've created a gist with the functionality (which is trivial), that I use to do this from command line:

So e.g. for one of my projects, the above gist prints:

    "aws2js": "0.6.4",
    "colors": "0.6.0-1",
    "express": "2.5.6",
    "eyes": "0.1.7",
    "ip2cc": "0.9.3",
    "jade": "0.20.0",
    "mongodb": "0.9.8-4",
    "nib": "0.3.2",
    "node-uuid": "1.3.3",
    "": "0.8.7",
    "stylus": "0.22.6",
    "underscore": "1.3.1",
    "vows": "0.6.1",
    "winston": "0.5.9"

Perhaps, also add the option to print "*" instead the version for each package, for the projects where the coder feels lucky™


Actually I just created this as a standalone program:

Still, would be better to have this directly in npm as time progresses.


Very similar to my request at #1746. I think the feature is missing because it suggests a workflow of

npm install module
[update package.json...]

whereas the proper npm workflow is

[update package.json...]
npm install

Do I have that right, @isaacs?


@TrevorBurnham I usually do npm install module --save or npm install module --save-dev. (Actually, I use -S and -D, because I'm lazy and prefer shorthands.)


Feature already existing -- I guess this issue should be closed.

@luk- luk- closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.