1

I have an Angular2 project created with the angular-cli project templates in Visual Studio Code. Also, I installed the latest version of Typescript (2.0.3) via npm as well as via the Microsoft link (https://www.microsoft.com/en-us/download/details.aspx?id=48593) because I also use Visual Studio 2015. However, for some reason the I still get an error message when I start my Angular2 project. Note that even with a standard command prompt running tsc -v will still return 1.0.0.0.

  • How does tsc -v determine the version of typescript?
  • How do I get rid of this message in my Angular project and ensure it will be using the latest version of Typescript?

What am I missing here? Appreciate your help.

enter image description here

3 Answers 3

1

If you only need the last version of TypeScript, on both Visual Studios, then you can

  1. delete all previous installations which are located in:
    C:\Program Files (x86)\Microsoft SDKs\TypeScript.
  2. reinstall the latest TypeScript version.

Hopefully everything will work.

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

1 Comment

Thanks. Simply deleting the other versions has done the trick.
1

Did you install TypeScript via NPM? If this is the case, try uninstalling it via npm uninstall -g typescript. Now reinstall it via npm install -g typescript and check if the problem is solved.

Comments

1

The best way is to allow VScode to only use the version of typescript installed locally.

Drop this in your .vscode/.settings file.

 "typescript.tsdk": "./node_modules/typescript/lib" 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.