2

I am running the following command to update my TypeScript version from 1.8.5 to 2.0.7 :

npm install -g typescript

it shows as -- [email protected]

Afterwards, when I am trying to check it manually using : tsc --version, it shows me : Version 1.8.5

Please tell me how to upgrade version of typescript from Version 1.8.5 to 2.0.7.

5
  • 2
    Do you have any other version of typescript installed, like from Visual Studio? If not, go into the global packages directory and remove everything typescript and reinstall Commented Nov 4, 2016 at 13:49
  • 2
    Try uninstalling your existing typescript package(s) by executing npm uninstall -g typescript and then try installing the same like how you tried it eariler. Commented Nov 4, 2016 at 13:51
  • 3
    Check from which folder tsc being executed. Windows: where tsc, Unix: which tsc. Maybe there is another tsc on your path before npm's. Commented Nov 4, 2016 at 13:57
  • 1
    Above both sollutions are very helpful for me..thanks!! Commented Nov 5, 2016 at 10:51
  • 1
    I have run this exe from 'microsoft.com/en-us/download/details.aspx?id=48593' and set the environment variable in control panel and restart my computer then i got new version of my typescript Commented Nov 5, 2016 at 12:52

2 Answers 2

2

Down load "TypeScript_Dev12.exe" and run it.

After successfully installing, you will find "C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.0" in your system. Copy that path.

Now go to Environment Variables->System Variables->Path, now click on edit. Remove old path of type script and add new path over there.

Now restart your system. You will now find 2.0 as your typescript version.

Sign up to request clarification or add additional context in comments.

Comments

1

Megha shah is right, but I think is better to install via npm globally

npm install typescript -g

and so use the existing C:\Users{username}\AppData\Roaming\npm.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.