nodejs npm版本3把所有依赖包及子依赖包全部安装在node_modules根目录的问题

1 篇文章 0 订阅

npm从版本3开始把所有依赖包及其子依赖包全部安装在node_modules根目录。文件夹特别多,显得有点混乱,不太好管理。

Your dependencies will now be installed maximally flat. Insofar as is possible, all of your dependencies, and their dependencies, and THEIR dependencies will be installed in your project's node_modules folder with no nesting. You'll only see modules nested underneath one another when two (or more) modules have conflicting dependencies.

 

--legacy-bundling也不再支持,目前要想按以前的方式把子依赖包安装到对应依赖包文件夹下面的话,只能是把npm降级到版本2,如下命令:

[root@dev pengpengzhou] nvm use v4.6.0
Now using node v4.6.0 (npm v2.15.9)
[root@dev pengpengzhou] npm -v
2.15.9

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值