Webstorm 安装所有NodeJS模块

Webstorm 安装所有NodeJS模块,webstorm,Webstorm,在我的WebStorm NodeJS项目中,我有一个包含以下内容的package.json: { "name": "application-name", "version": "0.0.1", "scripts": { "main": "node $NODE_DEBUG_OPTION ./app-compiled.js" }, "dependencies" : { "gulp" : "latest", "body-parser" : "latest"

在我的WebStorm NodeJS项目中,我有一个包含以下内容的
package.json

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

  }
}
当我在项目的根目录中执行
npm安装时,会安装几十个模块(请参见:),而我只希望安装两个模块

  • 为什么要安装所有这些模块?为了只安装两个模块,我应该怎么做

  • npm安装
    创建一个带有“库根”标志的
    node\u modules
    文件夹。这是什么意思


  • 因为这些都依赖于吞咽。如果打开gulp文件,您将看到很多var someName=require(“”);这被称为依赖性。npm安装是一种递归安装

    因为这些都依赖于吞咽。如果打开gulp文件,您将看到很多var someName=require(“”);这被称为依赖性。npm安装是一种递归安装

    这些必须是
    gulp
    body parser
    模块使用的包。这些必须是
    gulp
    body parser
    模块使用的包。