How to install NPM packages globally without sudo
Dec 31, 2021
mkdir -p ~/.local && npm set prefix ~/.local
Restart the terminal to apply the changes.
Packages will now be installed in “~/.local/lib/node_modules”.
mkdir -p ~/.local && npm set prefix ~/.local
Restart the terminal to apply the changes.
Packages will now be installed in “~/.local/lib/node_modules”.
~ F̶u̶l̶l̶ ̶s̶t̶a̶c̶k̶ developer ~ Cybersecurity s̶p̶e̶c̶i̶a̶l̶i̶s̶t̶ ~ Web Scraping E̶x̶p̶e̶r̶t̶