node_modules directory structure has file names longer than 250 characters #4054
Comments
Oh, if this helps, here's one of the long directory paths: node_modules\grunt-google-cdn\node_modules\bower\node_modules\update-notifier\node_modules\request\node_modules\form-data\node_modules\combined-stream\test\integration\test-delayed-streams-and-buffers-and-strings.js That's 216, plus if you prepend it with the path where the project is living, it pops past 250. There's over 100 files in these structures with this problem, as I said above :) Cheers! |
Nope, this is a Windows Explorer limitation, not something npm can control. npm (and node) use filesystem methods that do not have this limitation; if you are using other software (such as Windows Explorer) that does not support long file names, the bugs need to be fixed there, and not in npm. |
We were seeing this issue as well on Windows; specifically with Virtualbox shared folders. Would cc @lynnaloo |
To move the project, delete the node_modules first and then run However, you will not be able to delete it from explorer. I built this small powershell script that does it for you. https://gist.github.com/abergs/e682cd1f98f5170e86a6 We use that script at work. |
will take care of removing the paths. @tjwebb |
Hey guys/gals :) Great system, by the way! I'm having some trouble, however, as I'm unable to move my project on my disk because Windows is saying that over 100 files within the node_modules directory structure have file names longer than 250 characters. I've isolated it to files inside of grunt-contrib-imagemin and grunt-google-cdn. Since Windows has a file name size limit of 250, is there a way you could use a shallower directory structure for these? For some reason, the scripts that made the files were able to do so, but now nothing can deal with these files. I can't zip them or copy them. If I open one of the really long ones, Windows has consolidated all the node_modules parts of the path to NODE_M~1, but that doesn't seem to help when writing the files, such as copying, etc. Any help would be much appreciated!
The text was updated successfully, but these errors were encountered: