Node already installed, it's just not linked : <p>I tried to fix the error where you have to use sudo when running npm. I blindly followed a link to uninstall node, the code was from this <a href="https://gist.github.com/nicerobot/2697848" rel="noreferrer">gist</a></p>

<p>After running the command and I tried to install it back with brew: <code>brew install node</code>. Which gave me the following error:</p>

<pre><code>Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/doc/node/gdbinit
/usr/local/share/doc/node is not writable.

You can try again using:
  brew link node
</code></pre>

<p>Trying to run <code>brew link node</code>, I got:</p>

<pre><code>Linking /usr/local/Cellar/node/5.4.0... 
Error: Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.
</code></pre>

<p>Then when I write <code>brew install npm</code>, I get:</p>

<pre><code>Warning: node-5.4.0 already installed, it's just not linked
</code></pre>

<p>When I write <code>npm -v</code> I get:</p>

<pre><code>env: node: No such file or directory
</code></pre>

<p>Any ideas on how to solve this?</p>
