Correcting Version of Typescript on Windows 7 Machine

I am trying to update my version of TypeScript on a Windows 7 machine. On a command line,

tsc --version

gives me:


I went to C:\Program Files (x86)\Microsoft SDKs\TypeScript and I see one folder that says "1.0". The TypeScript Web site says version 2.6 is available. To get it, it tells me to run

npm install -g typescript

The command runs with no errors but that "1.0" folder remains. What is really going on? Does Node Package Manager have a different TypeScript folder somewhere else? How do I add a more current folder to C:\Program Files (x86)\Microsoft SDKs\TypeScript? Any help would be appreciated.

1 answer

  • answered 2018-01-11 21:27 Aaron

    npm install -g typescript is going to install TypeScript to your NodeJS global packages folder. On Windows this is probably going to be %AppData%\npm\node_modules.

    I'm not sure how you ended up with a Microsoft SDKs folder, but whatever you did to create it can be done to update it. Basically npm's tsc is different than Microsoft SDKs's tsc.