`npm install` 正在安装几十个依赖项

`npm install` is installing dozens of dependencies

我的 package.json 只有 express、mongodb 和 pug 列为依赖项。当我删除应用程序根目录中的 node_modules 文件夹和 运行 npm install 时,它会安装 51 个依赖项(如下所示)。不确定发生了什么...

npm v3 依赖解析就是这样工作的,可能会安装 "some secondary dependencies (dependencies of dependencies) in a flat way".

也可以参考.