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:

[email protected] C:\Users\Sergio\GitHub\projeto
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│   ├── [email protected]
│   └─┬ [email protected]
│     └── [email protected]
// 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.