Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: Add support for process.env.npm_config_node_gyp #70

Closed
ktrzeciaknubisa opened this issue Jan 15, 2016 · 1 comment
Closed

Comments

@ktrzeciaknubisa
Copy link

As we have noticed in jxcore/jxcore#678, the node-gyp finding pattern is not sufficient if one would call e.g.:

$ jx install dtrace-provider
> dtrace-provider@0.6.0 install ...
> jx scripts/install.js

cannot locate npm install

This happens when there is no node-gyp and/or npm available under /usr/local/lib/node_modules/.

Therefore I'd like to propose adding support for process.env.npm_config_node_gyp which is a result of implementing npm install --node-gyp=<path-to-custom-node-gyp> by npm team: npm/npm#4887 .

Thus scripts/install.js of dtrace-provider would have this added:

if (process.env.npm_config_node_gyp && fs.existsSync(process.env.npm_config_node_gyp))
  nodegyp = process.env.npm_config_node_gyp;
@melloc
Copy link
Collaborator

melloc commented Jan 12, 2018

From jxcore/jxcore#678 it sounds like you fixed this by changing it to call npm-cli.js instead. After the fix for #95 (which was released in dtrace-provider@0.8.3), this library uses the node-gyp in the PATH, which should also take care of fixing this issue.

@melloc melloc closed this as completed Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants