npm change package installation location
1 min readMay 26, 2020
When users don’t have admin access to install packages in root directory they can change package location to user’s writable location.
find the fix below
- Make directory `mkdir ~/.npm-global`
- Set configuration folder location
`npm config set prefix ~/.npm-global` - Add path to user environment path
`export PATH=~/.npm-global/bin:$PATH`
That is it.Now onwards when you install any package globally it will be placed in npm-global folder.