Konubinix' opinionated web of thoughts

Use Npm Install -G in ~/.Local Non-Root

Fleeting

The only trick is to bend npm with the $npm_config_prefix environment variable and change $PATH and $NODE_PATH as such:

export PATH=$HOME/.local/bin:$PATH export NODE_PATH=$HOME/.local/lib/node_modules:$NODE_PATH export npm_config_prefix=$HOME/.local Then, both npm install -g and pip install –user will work as your normal user

https://yourlabs.org/posts/2020-02-05-npm-install-g-home-local/