Home > OS >  I installed type script globally with npm on my mac and it not working
I installed type script globally with npm on my mac and it not working

Time:05-29

Ive tried to install TS globally on my mac with the command npm install typescript -g also tried this with the "sudo" before, its looks like it working but then when i trying to look up my tsc version in the terminal, I get this error zsh: command not found: tsc.

CodePudding user response:

On mac, instead of NPM, install typescript with:

brew install typescript

(Also if you want to make the npm i -g typescript work, try this to add the globally installed packages to the PATH)

Also make sure to install the proper ts extensions for your IDE.

  • Related