-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npx node-gyp@version
runs the copy of node-gyp bundled with npm instead
#3058
Comments
i can confirm this, and i see the reason it's happening, but i need to do a bit of research to see why the code is the way it is before we can consider changing it. i'll do some digging and follow up here when i have an answer |
I filed another issue that seems related or at least tangentially related: #2839. I suppose they might be solved at the same time, depending on what the exact details turn out to be. |
I think this started with npm/run-script@e4c7cb3. As of that commit, So I think the wrong When debugging the execution with
Note these two:
First we have So I do think this has a similar cause to #2839. |
I think this is fixed in v8 of npm |
Yeah, it's probably not fixed, just that node-gyp 8 is now the bundled version of node-gyp as of npm 8. Edit: Yep, the latest npm, npm 8.1.3, is still affected. |
npx node-gyp@8
runs the copy of node-gyp v7.1.2 bundled with npmnpx node-gyp@version
runs the copy of node-gyp bundled with npm instead
This should be fixed as of ~/D/n/s/npx $ npx node-gyp@9 --version
v9.0.0
~/D/n/s/npx $ npx node-gyp@8 --version
Need to install the following packages:
node-gyp@8.4.1
Ok to proceed? (y)
v8.4.1 |
Current Behavior:
npx node-gyp@8
runs the oldernode-gyp
7.1.2 that is bundled withnpm
./home/[me]/n-prefix/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
Same result if doing plain
npx node-gyp
. The latest version is v8.0.0, but v7.1.2 is used instead. Happens even ifnode-gyp
v8 is installed globally, and nonode-gyp
is installed in the locationnpx
is run from.Expected Behavior:
A separate
npx
-specific copy ofnode-gyp
v8 should run. Or whennode-gyp
v8 is installed globally, that could be used.Steps To Reproduce:
npx node-gyp
ornpx node-gyp@8
ornpx node-gyp@8.0.0
, etc.Environment:
The text was updated successfully, but these errors were encountered: