This project is read-only.

Error on git commit

Dec 3, 2014 at 2:21 PM
When i want to commit my changes in a ntvs project, an exception will be thrown:
An error occurred. Detailed message: Invalid path for filesystem
The data area passed to a system call is too small.
It seems that the path exceeding MAX_PATH.
When i remove the supertest module from node_modules, i can commit again.

The error appears since the last second release of ntvs.
Dec 3, 2014 at 5:49 PM
I doubt that it is directly related to NTVS release (we don't handle git commit, it's standard VS functionality). It's more likely that the dependency tree for supertest has changed in such a way that some dependency now exceeds MAX_PATH, and you have hit it once you've updated the package.

Unfortunately, we cannot really do much about all the current crop of MAX_PATH issues, since we're fundamentally limited by the underlying platform (VS and .NET) not handling it right; so the best we can do is detect and warn (if you try to install a package from VS, you should see said warning). There is a catch-all request about MAX_PATH filed against VS - I encourage you to upvote and track that if you want to see this resolved in NTVS and other VS-dependent tools. It would also be helpful if you can file a specific issue regarding git commit in VS bug tracker.

In the meantime, unfortunately, the only workaround is to reduce the paths as much as possible by using root-level, short folder names for projects. Alternatively, use subst to alias the project directory to a drive letter - this gives you the shortest root path possible. In many cases, MAX_PATH is only exceeded by 5-10 characters, and doing the subst trick is enough to work around that with some safety margin.