"npm install"将所有依赖项安装在node_modules目录中,而不是将它们嵌套 [英] "npm install" installs all dependencies in node_modules directory, instead of having them nested

查看:996
本文介绍了"npm install"将所有依赖项安装在node_modules目录中,而不是将它们嵌套的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道以下行为是否正常.

I need to know if the following behavior is normal.

当我npm install时,我的 package.json 中的每个软件包及其依赖项都不再安装嵌套,但是每个依赖项都安装在node_modules目录.这使我的node_modules目录被炸毁,看起来像这样:

When I npm install, each package from my package.json and the dependencies, don't get installed nested anymore, but each dependency is installed in the node_modules directory. That makes my node_modules directory blown and look like this:

这是自从我更新npm和node之后发生的.

This happened since I updated npm and node.

现在我运行:

npm -v 3.3.6
node -v 4.2.1
python 2.7
windows 7
wamp

我的package.json文件如下所示:

{
  "private": true,
  "devDependencies": {
    "gulp": "^3.8.8"
  },
  "dependencies": {
    "laravel-elixir": "^3.0.0",
    "bootstrap-sass": "^3.0.0"
  }
}

这是标准的laravel package.json文件.

It's the standard laravel package.json file.

有没有一种方法可以再次嵌套目录,因为我不喜欢这样的一篇有100多个子目录的文章.

Is there a way to have nested directories again, because I don't like such a blown article with over 100 sub directories.

推荐答案

这是npm 3行为,根据 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆