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 has been archived by the owner on Aug 11, 2022. It is now read-only.
I think npm should have clear way for manage system-wide packages (packages available for all users in system on Windows)
Therefore npm should deal with three types of packages:
local (without option)
global for user (--global)
this type of installation is very useful for development and testing purposes
global for system (--system for example)
this type of installation needed in production environment
The system-wide installation should:
uses other path for packages (accessible for reading by all users in system).
uses system environment variable PATH to store path to executables.
The system-wide installation may require the administrator's rights for user that invoke npm --system
There are possible variants for path for system-wide installation (discussion need):
%PROGRAMDATA%/npm (absent in Windows XP)
%PROGRAMFILES%/npm
Node's folder
Node's javascript afaik has no ability to set system environment variable %PATH%, but this variable can be set as part of Node installation (therefore Node's folder seems already ready for such installation).
The text was updated successfully, but these errors were encountered:
It turns out we were just discussing this over on #6413, and have been discussing closely related issues on #4564. I think this would be a good idea – maybe – but it's also pretty far down the priority queue because it's a pretty dramatic change and thus at least a major version out. I'm not averse to looking at patches or discussing it further, though.
After discussing this further with @iarna and @zkat, we agree that adding a third kind of prefix to npm, or making Windows and Unix-like OSes behave the same way here, is probably more complexity than is justified by the use cases created by this request. If you're installing binaries on a Windows system and want them shared across all tenants on the host, using npm config set prefix <global path> and running npm install --global <package> as Administrator will get most people where they need to go. (The need to run as Administrator is part of the reason why the original default for "global" installs was set to a path known to be controlled by the local user – it's awkward to support, and the team doesn't like advising users to run with elevated privileges unnecessarily.)
Because the team isn't going to get to this within the next year, I'm going to close this issue. Keep an eye on #4564, though – sometime in the not-too-distant future we're going to come to a resolution about the best place to put user-wide "global" installs on Windows, that may go some ways to addressing your need here. Thanks for your time!
Based on issues:
I think
npm
should have clear way for manage system-wide packages (packages available for all users in system on Windows)Therefore
npm
should deal with three types of packages:local (without option)
global for user (
--global
)this type of installation is very useful for development and testing purposes
global for system (
--system
for example)this type of installation needed in production environment
The system-wide installation should:
The system-wide installation may require the administrator's rights for user that invoke
npm --system
There are possible variants for path for system-wide installation (discussion need):
Node
's folderNode
's javascript afaik has no ability to set system environment variable %PATH%, but this variable can be set as part ofNode
installation (thereforeNode
's folder seems already ready for such installation).The text was updated successfully, but these errors were encountered: