On Windows, various tools do not like long file paths during the node-gyp/build phase of installation. These should be a way to build downloaded (not packaged) modules to a separate directory such as TMPDIR which has a smaller prefix than a nested module location.
I think an option like --separate-build-dir could be a boolean to build in something like NPM_BUILD_DIR || TMPDIR.
I'm getting Team City errors with the long paths. Local build errors with long paths. Was perfectly fine until I ended up with nested node_module from hell with grunt.
In the case of rebuilding, I am unsure if this should move the currently building directory, make a copy, or only just fail out. I am more in favor of failing out in this case, stating that the config does not make sense.
Building in temp dirs turns out to be super problematic due to the way node resolves deps and the even minimal automated deduping in npm@2, let alone the radical deduping in npm@3.
But! The underlying problem, that node_modules folders often stretched way beyond what standard Windows tools support, should be fixed in npm/npm#multi-stage. As such, I'm gonna close this ticket. If this continues to be an issue, we'll look for additional approaches post npm@3.