Configure build phase to run in TMPDIR #5523

Closed
bmeck opened this Issue Jun 21, 2014 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

bmeck commented Jun 21, 2014

related: joyent/node#6960

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.

+1

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.

Contributor

bmeck commented Jun 23, 2014

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.

iarna added this to the multi-stage install milestone Sep 19, 2014

@iarna iarna added patch-welcome and removed patch-welcome labels Dec 15, 2014

Owner

iarna commented Mar 27, 2015

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.

iarna closed this Mar 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment