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.
add the directory containing the `node` executable currently running …
…to the PATH for lifestyle scripts
node exe dir to the PATH for lifestyle scripts