cPanel & WHM Version 94 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

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

Nicholas Craft shared this idea 31 days 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