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 Jul 3, 2019. It is now read-only.
After documenting the source of the permission corruption regularly occurring in ~/.npm/_cacache (see issue #174 ) I looked at the opposite error, which is sudo npm install -g leaving files and directories owned by the invoking user in the global /usr/lib/node_modules folder (e.g., when using NodeSource's packages which are recommended on nodejs.org).
Running, e.g., sudo npm install -g create-react-app leaves a slew of files owned by the invoking user/group under /usr/lib/node_modules. The reason is that pacote passes the uid/gid obtained from $SUDO_UID/$SUDO_GID to node-tar here, a change introduced with commit 2fa4598.
sudo npm install -g create-react-app completes successfully without leaving any user-owned files or directories in /usr/lib/node_modules, as can be verified using find(1).
This regression appears to have been introduced as part of release 5.0.1, but there does not appear to be a github issue related/linked to the change, making it difficult to establish the context in which this change was introduced.
The text was updated successfully, but these errors were encountered:
After documenting the source of the permission corruption regularly occurring in
~/.npm/_cacache
(see issue #174 ) I looked at the opposite error, which issudo npm install -g
leaving files and directories owned by the invoking user in the global/usr/lib/node_modules
folder (e.g., when using NodeSource's packages which are recommended on nodejs.org).Running, e.g.,
sudo npm install -g create-react-app
leaves a slew of files owned by the invoking user/group under/usr/lib/node_modules
. The reason is that pacote passes the uid/gid obtained from$SUDO_UID/$SUDO_GID
to node-tar here, a change introduced with commit 2fa4598.After applying this patch:
sudo npm install -g create-react-app
completes successfully without leaving any user-owned files or directories in/usr/lib/node_modules
, as can be verified using find(1).This regression appears to have been introduced as part of release 5.0.1, but there does not appear to be a github issue related/linked to the change, making it difficult to establish the context in which this change was introduced.
The text was updated successfully, but these errors were encountered: