User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
gentoo:npm [2025/01/21 07:23] – created willygentoo:npm [2025/03/13 13:26] (current) willy
Line 1: Line 1:
-====== Using npm on Gentoo ======+====== H) Using npm on Gentoo ======
  
 Quite similarly to the issue with [[gentoo:pip|pip]], direct installation of NodeJS packages via **npm** poses some issues since you don't really want to mess up your system by installing out of tree packages. Everything //should// be managed by portage, but hey, there are literally thousand of packages that you might find usefull to install via **npm**. Quite similarly to the issue with [[gentoo:pip|pip]], direct installation of NodeJS packages via **npm** poses some issues since you don't really want to mess up your system by installing out of tree packages. Everything //should// be managed by portage, but hey, there are literally thousand of packages that you might find usefull to install via **npm**.
Line 14: Line 14:
 su - my_non_root_user su - my_non_root_user
 npm config set prefix .npm_install npm config set prefix .npm_install
-echo export PATH=$PATH:~/.npm_install/bin/ >> .bashrc 
 </code> </code>
 +
 +Add this to your **~/.bashrc**:
 +<file>
 +export PATH=$PATH:~/.npm_install/bin
 +</file>
  
 At this point, you will be able to install packages with a command like: At this point, you will be able to install packages with a command like:

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information