Is there an existing issue for this?
This issue exists in the latest npm version
This is not just a request to bump a dependency for a CVE
Current Behavior
Observed 🔭 on the npm v11 shipped ⚓ with Node.js:
After setting npm config set node-gyp <path> to globally 🌐 installed version of node-gyp on Windows npm continues to use built-in node-gyp no matter what.
Expected Behavior
After setting npm config set node-gyp <path> to the new path npm should pick up that path to run node-dyp during execution of npm install.
Steps To Reproduce
- Install
node-gyp globally: npm install node-gyp -g
- Set
node-gyp global path in npm config: npm config set node-gyp $(echo "${ npm ls -g node-gyp --parseable; }\bin\node-gyp.js")
- Run:
npm install @confluentinc\kafka-javascript --foreground-scripts --loglevel=silly
- See error and observe that built-in
node-gyp still in use:
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'clean'
gyp verb cli ]
gyp info using node-gyp@12.4.0
gyp info using node@26.5.1 | win32 | x64
Environment
- npm: 11.17.0
- Node.js: 26.5.1
- OS Name: Windows 11
- System Model Name: Microsoft Windows 11 Enterprise
- npm config:
script-shell=C:\Program Files\Git\bin\bash.exe
node-gyp=C:\Users\<redacted>\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js
Is there an existing issue for this?
This issue exists in the latest npm version
This is not just a request to bump a dependency for a CVE
Current Behavior
Observed 🔭 on the
npmv11 shipped ⚓ with Node.js:After setting
npm config set node-gyp <path>to globally 🌐 installed version ofnode-gypon Windowsnpmcontinues to use built-innode-gypno matter what.Expected Behavior
After setting
npm config set node-gyp <path>to the new pathnpmshould pick up that path to runnode-dypduring execution ofnpm install.Steps To Reproduce
node-gypglobally:npm install node-gyp -gnode-gypglobal path in npm config:npm config set node-gyp $(echo "${ npm ls -g node-gyp --parseable; }\bin\node-gyp.js")npm install @confluentinc\kafka-javascript --foreground-scripts --loglevel=sillynode-gypstill in use:Environment