How to see all modules installed on nodejs?

4

I'm giving a spin on nodejs and would like to know how to list all the modules I've installed.

How can I do this?

    
asked by anonymous 05.12.2015 / 18:06

1 answer

5

The modules you install must be set to package.json -> "dependencies" following the rules for versioning names and suffixes from each module.

There you define all the programs that your project needs and install everything running

npm install

To know / confirm what's installed and which version you can use $ npm ls that gives you a list of those programs and their dependencies.

An example result of this npm list would look like this:

[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
    
05.12.2015 / 18:12