Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

Add node and npm commands to $PATH when node.js is installed through EasyApache 4

Nicholas Craft shared this idea 3 years ago
Open Discussion

I currently work for a web hosting company. I provide tech support, and came across this issue today.


After using EA4 to install node.js the node and npm commands are -not available- to any cPanel user by default.


My current fix is to add this little line:

export PATH=/opt/cpanel/ea-nodejs10/bin/:$PATH

to the .bashrc for whatever user you want to have access to either the node or npm commands, which is located here (which you probably know):


/home/cpusername/.bashrc

I'm feature I'm requesting, or the suggestion I'm making, is that node and npm be added to $PATH when node.js is installed so that this doesn't have to be done manually.

Thanks!

Leave a Comment
 
Attach a file