You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of #2869 and the fact that Github upgraded Python to 3.12 in their newest macos runner image (see actions/runner#2972) I currently try to get node-gyp upgraded somehow.
The only way I found working BTW is to add node-gyp in the respective version as dependency to the module in question. Then Npm is using his version over the bundled one. maybe this should be the default solution (ok honestly ... maybe not "the best" solution but a working one?
@cclauss I used the command you pasted but getting this error. I've been trying all day to get NPM to use a different version of node-gyp.
python3 -m pip install --upgrade node-gyp
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement node-gyp (from versions: none)
ERROR: No matching distribution found for node-gyp
The only way I found working BTW is to add node-gyp in the respective version as dependency to the module in question. Then Npm is using his version over the bundled one. maybe this should be the default solution (ok honestly ... maybe not "the best" solution but a working one?
Thank you! This is unrelated to Python, but I have been trying for two days straight to get a project to use the latest node-gyp on Windows, followed the instructions on the documentation, but node still kept using an older version (v6.1.0). This got it working.
Windows11, Python3.12, Nodejs v21.7.0, npm v10.5.0, node-gyp v10.1.0
Facing the same problem....
I have successfully updated "node-gyp" at the path "C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script" using npm i node-gyp@latest. However, after running npm install in the project, it still shows "the npm error gyp info using node-gyp@8.4.1".
Update
After the aforementioned steps, I recreated the project, deleted the package-lock.json, ran npm -i -g node-gyp@latest, and then npm install. It worked perfectly.
Activity
dlqqq commentedon Nov 12, 2023
@Apollon77 I've opened a related issue to explicitly indicate supported Node versions per
node-gyprelease: #2948cclauss commentedon Nov 13, 2023
Python v3.12requiresnode-gyprelease >= v10.JakeWilsonSalesforce commentedon Jan 31, 2024
Yes so how do you force npm to globally use
node-gypv10? The instructions here: https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md don't work fornpmv10. npm is still trying to usenode-gypv7.x.cclauss commentedon Feb 1, 2024
Can you please provide the commands typed and the output when you tried those instructions on
npmv10?Or just
python3 -m pip install --upgrade node-gypoasaleh commentedon Feb 13, 2024
@cclauss I used the command you pasted but getting this error. I've been trying all day to get NPM to use a different version of
node-gyp.cclauss commentedon Feb 13, 2024
First create and activate a venv.
LeventCelik commentedon Feb 17, 2024
Thank you! This is unrelated to Python, but I have been trying for two days straight to get a project to use the latest node-gyp on Windows, followed the instructions on the documentation, but node still kept using an older version (v6.1.0). This got it working.
Tuscan-blue commentedon May 11, 2024
Before
Windows11, Python3.12, Nodejs v21.7.0, npm v10.5.0, node-gyp v10.1.0
Facing the same problem....
I have successfully updated "node-gyp" at the path "C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script" using
npm i node-gyp@latest. However, after runningnpm installin the project, it still shows "the npm error gyp info using node-gyp@8.4.1".Update
After the aforementioned steps, I recreated the project, deleted the package-lock.json, ran
npm -i -g node-gyp@latest, and thennpm install. It worked perfectly.