比如我安装gulp时,会多出很多无用的包,如下图:

经过查询,原来是npm升级了导致的,在npm3.0以上的版本,包的依赖不再安装在每个架包的node_modules文件夹内,而是安装在顶层的node_modules文件夹中。
解决方法:
# 清空node_modules文件后,重新执行命令
npm install --legacy-bundling

解决npm install安装了太多架包的问题的更多相关文章

  1. 解决npm install安装慢的问题

    国外镜像会很慢 可用 get命令查看registry npm congfig get registry 原版结果为 http://registry.npmjs.org 用set命令换成阿里的镜像就可以 ...

  2. npm install安装时忘记--save解决方法

    title: npm install安装时忘记--save解决方法 date: 2017-05-07 20:17:54 tags: npm categories: --- 网上还有一个解决方案就是: ...

  3. npm install 安装项目依赖,报错ERR! Unexpected end of JSON input while parsing near的方法汇总

    问题描述: npm install 安装项目依赖的时候,有时会出现: ERR! Unexpected end of JSON input while parsing near 错误 原因: npm 的 ...

  4. npm install 安装依赖报错

    npm ERR! Unexpected end of JSON input while parsing near '...2.4.8","karma":"~0. ...

  5. npm install 安装不成功,提示python2.7

    npm install 安装不成功的原因 是因为缺少python的环境 解决方法: 1.去官网下载https://www.python.org/download/releases/2.7/ 2.安装成 ...

  6. npm中package-lock.json的作用:npm install安装时使用

    简单理解: XYZ 的格式 对应为: 主版本号.次版本号.修订号,版本号递增规则如下: 主版本号:当你做了不兼容的 API 修改, 次版本号:当你做了向下兼容的功能性新增, 修订号:当你做了向下兼容的 ...

  7. npm install 安装很慢

    npm install 安装很慢 设置国内镜像 npm config set registry https://registry.npm.taobao.org npm install

  8. 使用npm install安装项目依赖的时候报错

    使用npm install安装项目依赖的时候报错: npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.14.1 postin ...

  9. 解决chrome插件安装时出现的“程序包无效”问题信息:程序包无效。

    https://blog.csdn.net/bluexuemei/article/details/35213117 2014-06-27 09:00:51 bluexuemei 阅读数 14374更多 ...

随机推荐

  1. CentOS 7 x64 安装 Ceph

    CentOS 7  x64 安装 Ceph 二, 实验环境 节点            IP                 主机名                  系统 MON         1 ...

  2. iOS开发——绘图电池按百分比显示

    1.在DrawLine.h文件中提供了一个改变电池电量数值的接口 // //  DrawLine.h //  Demo-draw2 // //  Created by yyt on 16/5/11. ...

  3. WIFI机器人网

    WIFI机器人网 WIFI智能小车机器人 外网远程控制WIFI智能小车机器人(WIFI板/703N)

  4. asp.net-mvc验证码 asp.net-mvc c#验证码

    验证码看不清换一组 写一个类 public class ValidateCode { public ValidateCode() { } /// <summary> /// 验证码的最大长 ...

  5. Mybatis3.2.1整合Spring3.1

    Mybatis3.2.1整合Spring3.1 根 据官方的说法,在ibatis3,也就是Mybatis3问世之前,Spring3的开发工作就已经完成了,所以Spring3中还是没有对 Mybatis ...

  6. Memcached源码分析

    作者:Calix,转载请注明出处:http://calixwu.com 最近研究了一下memcached的源码,在这里系统总结了一下笔记和理解,写了几 篇源码分析和大家分享,整个系列分为“结构篇”和“ ...

  7. matlab取模与取余

    mod函数采用floor,rem函数采用fix函数.那么什么是floor和fix? fix(x):截尾取整.如: >> fix([3.4 , -3.4]) ans = 3 -3 floor ...

  8. 【NOIP2015】反思+题解

    D1T1> 神奇的幻方 模拟即可. #include <cstdio> #include <cstring> #include <algorithm> #de ...

  9. python模块的打包setuptools

    样例代码:新建test.py文件,内容如下: print "show me" 新建一个setup.py编译文件,内容如下: from distutils.core import s ...

  10. BZOJ2720: [Violet 5]列队春游

    2720: [Violet 5]列队春游 Time Limit: 5 Sec  Memory Limit: 128 MBSubmit: 173  Solved: 125[Submit][Status] ...