Installing gulp-imagemin on Windows creates well over 10,000 files

和自甴很熟 提交于 2019-12-24 04:13:07

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/29759705/installing-gulp-imagemin-on-windows-creates-well-over-10-000-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!