在Windows上安装gulp-imagemin可创建超过10,000个文件 [英] Installing gulp-imagemin on Windows creates well over 10,000 files

查看:177
本文介绍了在Windows上安装gulp-imagemin可创建超过10,000个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7笔记本电脑上安装了gulp-imagemin,使用

  npm install --save-dev gulp-imagemin 

,经过漫长的过程后,文件夹中的文件超过10,000个,文件夹结构也非常深厚。有没有人看过这个?是否可能是正确的,或者我是否正确地怀疑问题? 是的,这是正确的。我已经在Windows机器上安装了它,并且看到了与您在此处描述的相同的内容。



它拥有超过10,000个文件和更长的目录结构是节点模块的本质。

每个节点模块都是自包含的,并且有一个子目录node_modules及其所有依赖关系。这些依赖关系也具有依赖关系,从而产生非常深的目录结构。

当我尝试删除gulp-imagemin时,Windows甚至会抱怨目录结构太大,并且无法删除某些文件。这是因为MAX_PATH长度为260个字符;请参阅 msdn.microsoft.com

然而,我真的非常喜欢这个节点模块,并且我正在使用它在我工作的每个前端项目中。有时需要2次尝试才能安装它,但我认为这绝对是值得的。



在GitHub上,我有一个用于处理单页应用程序的初学者应用程序; 我也在其中使用它。


I have installed gulp-imagemin on my Windows 7 laptop using

npm install --save-dev gulp-imagemin

and after a lengthy process ended up with a folder with well over 10,000 files and some very deep folder structures. Has anyone else seen this? Is it likely to be correct or would I be right in suspecting an issue?

解决方案

Yes it is correct. I've installed it too on my Windows machine and I saw the same thing as you describe here.

The reason it has over 10,000 files and an even more lengthier directory structure is the nature of node modules.

Each and every node module is self containing and has a sub directory node_modules with all it's dependencies. Those dependencies have dependencies as well, resulting in a very deep directory structure.

When I try to remove gulp-imagemin, Windows is even complaining that the directory structure is too large and that it cannot remove certain files. This is because of the MAX_PATH length of 260 characters; see msdn.microsoft.com.

Nevertheless I really, really like this node module and I'm using it in every front end project I work on. Sometimes it takes 2 tries to install it, but I think it's definitely worth it.

On GitHub I have a starter application for working with single page applications; skeletonSPA in which I use it too.

这篇关于在Windows上安装gulp-imagemin可创建超过10,000个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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