Hi,
I am trying to move my Node.js app and while copying, some files fail to move with the error message Destination path too long. Prima facie, it seems due to the repeatedly embedded 'node_modules' folders for some npm libraries (like babel). [few images attached]
D:\dev\temp\myexpress\node_modules\babel-core\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify\node_modules
Is this not a good design?Can anyone help me with a workaround for this?


Long Path Tool will let you easily delete, copy or rename long path files.
You can use the long path tool for this issue.
In using the long path tool you just have to click on the long path tool application icon and the tool will provide you a window that contains all your files. You have now the capability to move, delete rename and modify your files without getting error messages. It is a user friendly tool and it is a quick fix for this issue.
You can use the long path tool for this issue.
In using the long path tool you just have to click on the long path tool application icon and the tool will provide you a window that contains all your files. You have now the capability to move, delete rename and modify your files without getting error messages. It is a user friendly tool and it is a quick fix for this issue.
I would like to suggest you, try LongPathTool program to resolve this issue. This tool is very helpful to resolve the issue.
5 out of 5 stars for this only program Long Path Tool. Others are definitely not recommended. Try it to believe it. Please use this program and nothing else & I am being serious.
I think you must use Long Path Tool.. You can either move the file to another location for shorter path or change the filename with this. It will definitely resolve your issue. I have been using this tool for a long time.
I suggest you to use Long Path Tool Program to solve your problem.
What npm version do you run? Since v3 this shouldn't be a problem because of a flat installation. If this is installed with an older version, delete the top node_modules folder and run npm i again.
Yes, node and windows have this little issue with paths.
At first, IDK why you want to copy the folder including node_modules , is better to only copy YOUR files and your package.json file and do a npm install in your new folder.
In any case, I have a similar issue trying to delete completely de node_modules folder and reinstall all dependencies again; this for I created this simple PowerShell script to do it. It uses windows robocopy.aspx). You can modify it to instead of replacing the node_modules folder, you copy all your project to other location. If you don't use PowerShell this .bat file is for you.
Let me know if it works!
Juan Miller
Hi, for problems concerning path too long issues, I suggest you try the new long path tool. This can help you with all kinds of path too long cases