-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
npm does not update until first reboot #588
Comments
What shell are you running? You should not need to reboot. Depending on your shell and how command paths are cached, you may need to start a new shell or cause your shell to look for commands again. I suspect you may now have two versions of npm installed, and until the cache was cleared you were getting the version in People have reported needing to start new shell in the past, but not pinned down the exact circumstances:
Here is what I see with a fresh boot of a docker container:
|
Running Ubuntu container with bash, and reproducing your possible steps (showing matching problem, and
|
I came across some other reboot/restart comments today:
|
I have added some addition output in
|
I was also having this issue. |
Bug Report
npm
does not update until the first reboot. There needs to be some type of message to explain this to users.Summary
n
does not start updatingnpm
until after the first reboot. After the initialn
installation, I switched node version witch triggersnpm
version update. The node version changed but thenpm
version did not. I noticed that there needs to be a reboot in order for it to start working. There needs to be some type of message to explain this to users. I thought it was not working and started debugging only to find that it needs a system reboot to start working properly.Steps to Reproduce
Step 1:
npm i n
Step 2:
n latest
Expected Behaviour
npm
should update to the version included in the installed version of node.js or inform the user that an OS restart is needed.Actual Behaviour
npm
does not update to the correct version until a system reboot happens.Other Information
It would make sense for
n
to give a message after installation explaining to users that they need to reboot in order fornpm
to update correctly.Configuration Details
fresh installation of Ubuntu 18.04.3 LTS
installed
n
usingnpm
version ~3 (the version that comes withsudo apt install npm
). Node.js was not installed until aftern
installed it for the first time.The text was updated successfully, but these errors were encountered: