How to Install npm/nvm on mac without admin, sudo or homebrew

30 Days of Code & Writing: Part 3

Hans McMurdy
JavaScript-First

--

Recently, I accepted a teaching position and unfortunately even as a coding instructor, I don’t have full admin rights on the computer. The problem is I have to teach node, nvm and quite a few other things that typically require some form of admin permissions because you know, we’re developers.

I’ve installed node on GoDaddy shared hosting before (not recommended) so I know all about the nvm workaround but never did this on a mac before.

Normally we’d rely on good old Google but for whatever reason every single article I’ve read requires one or more of the options above regardless of their title. So I guess it’s time to write an article.

Before we begin let's make sure there is a bash profile by opening up a terminal and running the following command to create a file called .bash_profile. As a dot file this is a system file:

touch ~/.bash_profile

Now we use curl to download a shell script which will install nvm. You may also need to have git installed on your machine:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

--

--

Hans McMurdy
JavaScript-First

Full Stack Problem Solver - Web (Front/Back), Hardware, Finance (Quant Stuff)