title: How to fix 'tsc: command not found'
body: <p>I'm currently trying to install typescript on my machine for the first time. After installing node I run the following command:</p>
  
  <pre><code>sudo npm -g install typescript
  </code></pre>
  
  <p>This yields what appears to be a positive install message</p>
  
  <blockquote>
    <p>/Users/mac/.npm-global/bin/tsc ->
    /Users/mac/.npm-global/lib/node_modules/typescript/bin/tsc
    /Users/mac/.npm-global/bin/tsserver ->
    /Users/mac/.npm-global/lib/node_modules/typescript/bin/tsserver
    + typescript@3.4.4 updated 1 package in 0.924s</p>
  </blockquote>
  
  <p>After this, I check to see if the install was successful but running <code>tsc --version</code> and receive the following error:</p>
  
  <pre><code>tsc: command not found
  </code></pre>
  
  <p>From another thread I have tried:</p>
  
  <p>restarting the terminal
  restarting the machine
  reinstalling nodejs + then run <code>sudo npm install typescript -g</code></p>
  
  <p>I have also tried updating my bash profile with the following line:</p>
  
  <pre><code>export PATH="$PATH:"/Users/mac/.npm-global/lib/node_modules/typescript/bin/tsc"";
  </code></pre>
  
  <p>I am not confident typescript resides in the location I listed. Is there a way to confirm? </p>
  
  <p>Any help would be greatly appreciated.</p>