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
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
npm uses $APPDATA\npm so that non-Administrator roles have a writable place to stash global packages. Since creating that directory if it doesn't exist does require Administrator privileges, npm -g install <whatever> won't / can't work if the base directory doesn't exist (with the correct ACL) before npm is run. The installer should ensure that the whole path is set up at boot time.
Also, either the documentation needs to change, or maybe the installer, because right now, people trying to upgrade npm using npm after they've used the .msi frequently end up confused because npm -g install npm@latest doesn't actually upgrade them to the newest version of npm, because the first npm on their path is the one that was originally installed alongside node in the Administrator directory. Either the positions of AppData\roaming\npm and the Node binary directory need to be swapped in PATH, npm should be installed to AppData\roaming\npm in the first place, or the documentation should be clarified to tell Windows users exactly how to upgrade npm with the .msi-installed Node.