Pavel Mishin
Pavel Mishin

Reputation: 17

Install all NodeJS modules

Inside my WebStorm NodeJS project I have a package.json with this content:

{
  "name": "application-name",
  "version": "0.0.1",
  "scripts": {
    "main": "node $NODE_DEBUG_OPTION ./app-compiled.js"
  },
  "dependencies" : {
    "gulp" : "latest",
    "body-parser" : "latest"

  }
}

When I do npm install in root directory of the project, several dozen of modules get installed (see: http://take.ms/Iavqh), while I expect only 2 modules to get installed.

enter image description here

  1. Why are all these modules get installed? What should I do in order for just 2 modules to get installed?

  2. npm install creates a node_modules folder that has a "library root" sign. What does it mean?

Upvotes: 0

Views: 445

Answers (1)

Akash Bhandwalkar
Akash Bhandwalkar

Reputation: 901

Because these are dependancies of gulp. If you open gulp file you will see lot of var someName = require(''); This are called dependancies. npm install is an recursive installation.

Upvotes: 2

Related Questions