How to see all modules installed in nodejs?

Asked

Viewed 6,257 times

4

I’m taking a look at the nodejs and would like to know how do I list all the modules I installed.

How can I do that?

  • npm ls? but you must know this of yours package.json nay?

  • @Sergio, I don’t even know what you’re talking about. I’m really starting right now at the nodejs

  • @Sergio, this one showed a lot of stop. Boot in the reply

1 answer

5


The modules you install must be configured in the package.json -> "dependencies" by following the rules to names and versioning suffixes of each module.

Then set up all the programs your project needs and install everything running

npm install

To know/confirm what is installed and which version you can use $ npm ls that gives you a list of these programs and also of their departments.

An example of this result npm list would be so:

projeto@2.3.0 C:\Users\Sergio\GitHub\projeto
├─┬ agent@0.2.1
│ ├── mout@0.9.1
│ └── prime@0.4.2
├── async@1.4.2
├─┬ body-parser@1.13.3
│ ├── bytes@2.1.0
│ ├── content-type@1.0.1
│ ├── depd@1.0.1
│ ├─┬ http-errors@1.3.1
│ │ ├── inherits@2.0.1
│ │ └── statuses@1.2.1
│ ├── iconv-lite@0.4.11
│ ├─┬ on-finished@2.3.0
│ │ └── ee-first@1.1.1
│ ├── qs@4.0.0
│ ├─┬ raw-body@2.1.4
│ │ ├── iconv-lite@0.4.12
│ │ └── unpipe@1.0.0
│ └─┬ type-is@1.6.9
│   ├── media-typer@0.3.0
│   └─┬ mime-types@2.1.7
│     └── mime-db@1.19.0
// etc
  • And how do I list only a particular package ?

  • @Mikeotharan If you are on linux you can modify the output with grep, it would look like this npm list | grep nome_do_modulo and to list without the dependencies just use npm list --depth=0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.