-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
How upgrade node-gyp with npm 10? #2942
Comments
@Apollon77 I've opened a related issue to explicitly indicate supported Node versions per |
|
Yes so how do you force npm to globally use |
Can you please provide the commands typed and the output when you tried those instructions on Or just |
@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 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 |
First create and activate a venv. |
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. |
BeforeWindows11, Python3.12, Nodejs v21.7.0, npm v10.5.0, node-gyp v10.1.0 I have successfully updated "node-gyp" at the path "C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\run-script" using UpdateAfter the aforementioned steps, I recreated the project, deleted the package-lock.json, ran |
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.
In fact the instructions on https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md have no effect with npm 10 as it seems. I also tried several other options I found in the web but all are failingor do not use the new node-gyp.
What is the current way to do it?
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?
The text was updated successfully, but these errors were encountered: