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/

  • for one particular window, you can set PATH by export PATH="a/b/c". No need to edit bash_profile` then – anki Feb 27 '20 at 6:24
  • @ankii Do you mean set a temporary PATH in terminal whenever I want to use node? – taylor018 Feb 27 '20 at 16:11
  • 1
    is ~/.bash_profile not editable by standard user ? if not, then yes a temporary edit should work. let me correct myself, it should be PATH="a/b/c":"$PATH". In this window, this PATH will be used. verify using echo $PATH – anki Feb 27 '20 at 19:04
  • @ankii Awesome. Yep, that works! Thanks! – taylor018 Feb 27 '20 at 21:33

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


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

  • So, I'm having another issue related to this. When I try to globally install packages with npm, I get this error: sh: node: command not found – taylor018 Mar 2 '20 at 17:23
  • are you sure that bash_profile is not edible ? though there would be bigger problems with installing packages as a standard user than PATH. – anki Mar 2 '20 at 19:17
  • Yes the bash_profile is editable – taylor018 Mar 2 '20 at 19:18
  • then add this line there, no need to bother about window specific PATHs – anki Mar 2 '20 at 19:19
  • will that fix the error? – taylor018 Mar 2 '20 at 19:20

I ended up using nvm to install node because you don't need admin rights to do that. You just need to have the Command Line Tools.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .