⚠️ ARCHIVED WEBSITE, NO FURTHER UPDATES ⚠️

Daily Shaarli

All links of one day in a single page.

February 21, 2021

Installing npm global packages without root
thumbnail

Create a local npm directory where the npm packages will be installed:

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'

Edit bashrc or zshrc and add:

export PATH=~/.npm-global/bin:$PATH

Restart the shell.
Test it:

npm i -g http-serve
http-serve