-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installed directory structure is too long. Causes problems on Windows and can't be used with TFS source control #85
Comments
Just an FYI that I've opened the following Stack Overflow question to find a work around until this can get fixed. http://stackoverflow.com/questions/19795171/how-to-make-grunt-deploy-use-global-npm-modules-instead-of-local-ones/ |
The node_modules directory is managed (and named) by npm, not grunt or this task. It can't be changed. The (seemingly) recursive nesting of node_modules directories is necessary to provide localized versions of duplicate modules. |
Hey @jasonkarns thanks for clarifying that this is not a grunt problem and for posting a work around on the stack overflow link. For now we've got it working using symbolic links, but if I try your workaround out I'll be sure to post my results on the StackOverflow link. Thanks again. |
Glad you got something working! |
I know you found a workaround, but since you've had this issue before I wanted you to know that I've created a tool called fenestrate which you can use to programmatically flatten the directory structure of your modules after installation. You can install it as a global npm postinstall hook. |
anyone used “Long Path Tool” |
Try to long path tool. It is very helpful. |
The Long Path Tool is not free however. |
The directory structure of grunt-bower-task when installed is too long. Using "npm install", the path of the longest file, excluding the project directory that it would reside in, is 230 characters:
"\node_modules\grunt-bower-task\node_modules\bower\node_modules\update-notifier\node_modules\request\node_modules\form-data\node_modules\combined-stream\node_modules\delayed-stream\test\integration\test-delayed-stream-auto-pause.js"
Windows has a stupid restriction that affects TFS where a path can have a max length of 260 characters (http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx), so this only leaves 30 characters for the path that the project will reside in.
Because we work on enterprise applications, we are required to have ALL dependencies checked into source control; we can't be installing them from the internet at build time on the build server. Effectively this means that we can't use grunt-bower-task in production until this issue is fixed.
Since the 260 character limit is a Windows (FAT and NTFS file system) problem, I assume it affects other source control repositories on Windows, but I haven't confirmed that. I expect that many other people using Windows have this same problem.
If you want to see how long all of the file paths are, you can use the Path Length Checker tool at https://pathlengthchecker.codeplex.com/releases/view/82070.
I notice that there are many "node_modules" directories; perhaps just shortening those to "n_m" is an easy solution; it would shave 54 characters off of your paths.
The text was updated successfully, but these errors were encountered: