title: How to fix "node: command not found" on a Mac? Node was installed using nvm from homebrew
body: <p>I installed <strong>nvm</strong> on my Mac using Homebrew. </p>
  
  <pre><code>brew update
  brew install nvm
  mkdir ~/.nvm
  nano ~/.bash_profile
  </code></pre>
  
  <p>Added below to my .bash_profile</p>
  
  <pre><code>export NVM_DIR=~/.nvm
  source $(brew --prefix nvm)/nvm.sh
  </code></pre>
  
  <p>Then in my shell</p>
  
  <pre><code>source ~/.bash_profile
  echo $NVM_DIR
  </code></pre>
  
  <p>After doing those steps I <strong>installed</strong> <strong>nodejs</strong> <strong>using</strong> <strong>nvm</strong></p>
  
  <pre><code>nvm install v6.11.2
  </code></pre>
  
  <p>The problem is when I type node it <em>says node: command not found</em></p>
  
  <pre><code>$ node
  $ -bash: node: command not found
  </code></pre>
  
  <p>How do I make nodejs to work?</p>
  
  <p>Below is my .bash_profile</p>
  
  <pre><code>if [ -f `brew --prefix`/etc/bash_completion ]; then
      . `brew --prefix`/etc/bash_completion
  fi
  export PATH="/usr/local/bin:$PATH"
  
  #for brew nvm
  exportNVM_DIR=~/.nvm
  source $(brew --prefix nvm)/nvm.sh
  </code></pre>
  
  <p>This is the list of nodejs according to nvm</p>
  
  <pre><code>$ nvm list
          v6.11.2
  node -&gt; stable (-&gt; v6.11.2) (default)
  stable -&gt; 6.11 (-&gt; v6.11.2) (default)
  iojs -&gt; N/A (default)
  lts/* -&gt; lts/boron (-&gt; v6.11.2)
  lts/argon -&gt; v4.8.4 (-&gt; N/A)
  lts/boron -&gt; v6.11.2
  </code></pre>