How to use Node.js without admin rights on a mac?

I'm trying to use Node.js on my work computer but I don't have admin rights. I'm wondering how I can install Node.js on mac without having admin rights.

I found a tutorial, which is for Windows but still has been helpful. But, I'm stuck at the "Configure the PATH" step where I have to add to the $PATH variable. How can I complete that step on a mac?

Here's the tutorial: https://theshravan.net/blog/how-to-use-node-and-npm-without-installation-or-admin-rights/


Solution 1:

If ~/.bash_profile not editable by standard user, then a temporary edit to PATH should work. It should be

PATH="a/b/c":"$PATH"

In this window, this PATH will be used. verify using echo $PATH