-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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] updating to version 11 doesn't work correctly #8000
Comments
It seems like you used homebrew to install npm separately (npm should never be installed separately from node). If you brew uninstall it, you should find you have the version you expect already? |
I've never installed Now I removed |
I’d suggest installing node through an official means, which means, not homebrew at all. nvm or another version manager that installs from nodejs.org is your best bet. |
I had a notification when running npm to update it using |
@OS-Scratch if you didn't include |
I'm using Windows, and even without -g, it installed it globally. But installing it locally would be helpful to try out if it works, and if it works, then apply it globally. |
If it installed it globally without |
Sorry! |
Short version: what does running these show? where npm
echo $PATH Long version First, what went wrong. I suspect your problem is due to Homebrew ==> Caveats
==> node@22
node@22 is keg-only, which means it was not symlinked into /opt/homebrew,
because this is an alternate version of another formula.
If you need to have node@22 first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/node@22/bin:$PATH"' >> ~/.zshrc Assuming you followed those instructions, I reproduced the problem you described:
I now have two versions of npm installed, and the location of the older one is explicitly first in the I am not sure of the most elegant way to solve this if you want to keep using (Speculation after a few searches. Installing old versions using brew seems to be a bit complicated, and the LTS version of node is an "old" version. A simple thing to try in the medium term would be to put |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I see
10.9.0
.And I have seen already twice in console the warning to update to
npm@11
.But when I run
npm list -g
, I see:Expected Behavior
I should see
11.0.0
.Steps To Reproduce
[email protected]
with[email protected]
.Environment
The text was updated successfully, but these errors were encountered: