npm should invoke node-gyp using `process.execPath` #2680

TooTallNate opened this Issue Aug 6, 2012 · 1 comment


None yet

2 participants


With the new "portable" tarballs of node, the unpacked tarball may not be in the user's PATH, and if they invoke npm and install a native package, then node-gyp fails because it tries to use node in the PATH (cause of the /usr/bin/env node shebang in node-gyp). It would be ideal if node-gyp used the same node as the one executing npm.

Or better yet, when npm executes any external script, it would probably work properly if npm added path.dirname(process.execPath) to the PATH of any executed user script, that way this would always be true.

isaacs commented Aug 6, 2012


@TooTallNate TooTallNate added a commit to TooTallNate/npm that referenced this issue Aug 7, 2012
@TooTallNate TooTallNate add the directory containing the `node` executable currently running …
…to the PATH for lifestyle scripts

Fixes #2680.
@isaacs isaacs closed this in 8985944 Aug 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment