Steps to Reproduce:
I have not directly installed TypeScript globally with npm. I can only assume this is a result of having Visual Studio 2015 installed on the same machine. (I think that ships with tsc 1.0.3.0 installed globally?) I didn't experience this with VSCode 1.4 and below.
Is there a way to prevent this error short of uninstalling Visual Studio 2015?
The message appears to come from here: https://github.com/Microsoft/vscode/blob/b5a3c7350bdadd3b68a43fc825b4ac50f8ecc7b3/extensions/typescript/src/typescriptServiceClient.ts#L387
Thanks,
John
PS VSCode is awesome!
@dbaeumer can you comment on this? We may want to make it so the error message can be suppressed and only shown one time.
I thought you could suppress the message. When it popped up for me it had a do not show this message again button.
@johnnyreilly is that not working for you? The message will shown one time if you click Do not show this message again
@johnnyreilly in the past TS was a separate installable for VS. So you could uninstall it from the Control Panel.
Sorry - it can be suppressed. I was just more surprised that it was there. I have TypeScript Tools for VS 2015 1.7 installed; they may the cause? Is it the case that TypeScript tools for VS will always put tsc on your path?
hey @johnnyreilly no problem at all. I don't know the answer to your question. I'm going to close this issue as the issue is resolvable.
We opened a related one #11772
same thing here. I think we can just suppress the warning by click 'don't check again' button
@johnnyreilly the reason why we show it is that compiling in a terminal using tsc might produce a different set of errors then when opening the same project in VS Code. We got quite some bugs where people had a different global compiler version. That is why we added the check and allow you to not see it again :-)
Thanks for the explanation @dbaeumer - makes sense!
How is this check done? I don't have Visual Studio neither tsc as global package. I have typescript in the version 1.8.10 in my project. I don't have tsc in my package.json file.
I'm using VSC 1.5.2, Node 5.10.0.
I shell out and call tsc --version. What do you see if you type this into a terminal.
I've installed typescript 1.8.10 globally
npm install -g [email protected]
and it helped.
If I answer as "Don't check again" will it prompt me for other version mismatches in the future, or truly never check again?
@dbaeumer
in the past TS was a separate installable for VS. So you could uninstall it from the Control Panel.
Control Panel? What Control Panel? :^)
The Windows C.P.?
When I search for typescript in there I get and entry that seems to be related to VS 2015.
I think uninstalling this will cripple VS 2015.
So, now is my only option to go to :
Preferences -> User Settings
...and set typescript.tsdk to :
C:Program Files (x86)Microsoft VS Coderesourcesappextensionstypescriptservertypescriptlib
???
Will this work OK and for future versions of typescript as well? :^)
I have tried it now and seems to make the warning go away.
Although for some reason my file icons are gone (not sure what caused this... arrrr)... :|
This is very confusing when I never configured (or installed) typescript tooling.
The notification points to Using Newer TypeScript Versions with the _More Info_ button implying I configured Visual Studio Code to use a different typescript version than bundled, which _is not the case_.
Stating the discrepancy would be way better than implying something that may not be the case and by that creating confusion.
@Kissaki
Stating the discrepancy would be way better
We state the discrepancy and point to possible problem with the discrepancy. Could you give an example of what you expect to be different.
@dbaeumer I don’t see the message any more as I have ignored it, but if it’s the one from the OP here it seems to be correct after all.
The problem is that the “More Information” link does not provide more information about this (or even mentions it at all) but describes how to configure your own global compiler.
@dbaeumer perhaps we should point to this section in the release notes?
That’s a lot better/great! The last paragraph mentioning the "More Information" action would not fit anymore though.
Instead of pointing to the release notes I recommend that we had a section to the normal TypeScript documentation about the message and keep the link. Having that information in a normal doc is helpful for everybody. @waderyan can you coordinate with @gregvanl. If not I can craft some initial doc explaining the problem.
Experiencing the same thing. I have VS 2015 along side VSCode. Even for JS files this shows up - and the message bar doesn't seem to be easily dismissable. I either need to click the button for more info, or the button to never show again.
I don't really want the message to never show again, in case I do need TypeScript for a project - but as it is now, I get this warning for any project with JS files.
I'm not to keen on installing npm just to to be able to set typescript.tsdk. I guess I could set it to use the version VSC ships with? But where is that located? (That might be a nice thing to document.)
(Edit: just noticed @DumboJetEngine's comment that seems to have located it.)
Doc issue created here to address your comment @dbaeumer
@thomthom
It is in VS Code's preferences:
So, now is my only option to go to :
Preferences -> User Settings
...and set typescript.tsdk to :
C:Program Files (x86)Microsoft VS Coderesourcesappextensionstypescriptservertypescriptlib
Once you open the settings, go to the left panel and add this JSON property in the settings:
"typescript.tsdk": "C:Program Files (x86)Microsoft VS Coderesourcesappextensionstypescriptservertypescriptlib",
And the path mentioned just above is part of VS Code's installation (apparently), so you don't need to install anything extra.
Al least that's how I have fixed it.
If anyone has objections with that, let me know... ;)
Yea, I tried that and that seems to have sorted it for me as well.
Created https://github.com/Microsoft/vscode/issues/13266 for the JS issue.
For me it says I have version 2.0.6 installed Globally, and VS Code is using 2.0.3.
What is the easiest way I can tell VS Code to simply use whatever is installed Globally?
@Ciwan1859 the next VS Code update will ship with 2.0.6
If you always want to use the global version use the typescript.tsdk setting to point to your global installation.
update vsc application to 1.7.2
update typescript to 2.0.10
npm -g update typescript
or npm -g install [email protected]
reopen
I am having roughly the same issue, I believe webpack is using the correct typescript version, but when running tsc -v from powershell inside vscode it would always return 1.0.3 even though I had 2.0.3 installed locally (node_modules) and globally. I set typescript.tsdk as suggested in both my user settings and workspace settings, there was no change. I ended up having to remove the typescript path in my PATH variable (I have vs2013).
How come setting typescript.tsdk did not force powershell to use the version I wanted it to?
@forrestab since PowerShell doesn't know anything about the typescript.tsdk setting. Instead of uninstalling tsc globally you could also add the following user setting "typescript.check.tscVersion": false (which should happen automatically when pressing 'Don't ask again').
@dbaeumer I kind of figured that, however, what does the typescript.tsdk setting help with, syntax highlighting (I am failing to make a connection)?
@forrestab the typescript.tsdk allows you to use a different TS version than the one we ship with.
Closing since it seems like most of the questions here have been answered. We've opened issues to track some of the specific problems brought up here as well.
Useful note; I ran into this issue along with TS5007 and TS5023 compiler errors, and removing the old version of typescript from Path system environmental variable solved the issue mentioned here along with these compiler errors. More info: http://stackoverflow.com/questions/36800107/typescript-cant-be-compiled-in-vs-code-error-ts5007
@ciabaros this worked for me in windows 10. I also had to remove globally typescript and install it again so I can get the latest version (2.2.1). I have vs code also in mac os and had the same problem but with a later tsc version (not 1.0.3). All I had to do in that case was to update typescript. Thanks
I don't get it. Why does Visual Studio Code not use its own compiler by default, unless you explicitly tell it something different?
@s-h-a-d-o-w We try to be a lightweight editor, so we generally require that developers to bring their own external tools
Yet - to quote dbaeumer:
the next VS Code update will ship with 2.0.6
Isn't it the case that if Code did in fact rely purely on external tools, this version conflict could never happen in the first place?
A better, User Friendly, handling would be to offer the following:
1) Update the current project to match the version VSCode is using (latest version)
a) this action is currently NOT provided.
2) Turn off this warning until the next revision of TypeScript
a) this action is currently NOT provided.
3) Turn off this warning permanently (I and many of us probably won't choose this)
a) VScode provides [Don't Check Again]
4) Do not nothing keep nagging me (I doubt coders will use this one)
a) VSCode provides [Close]
Your current approach is only telling me do manually option 1)
forcing me to look up the doc and the command to update the current project with
npm install typescript --save-dev
In other words, the most frequent action in my case is NOT provided.
Also when get the following
$ npm list typescript -g
C:\Users\AXM\AppData\Roaming\npm
+-- [email protected]
| `-- [email protected]
+-- [email protected]
`-- [email protected]
`-- [email protected]
`-- [email protected]
$ npm list typescript
xyz@ S:\_W\ARP\UPS.TS\SRC\UPS.TS.2.0
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
`-- [email protected]
Current annoyance/distraction :)

What does it mean when VSCode says INFO "Using TypeScript (2.3.4) for editor features."
Then it adds "TypeScript (2.3.2) is installed globally on your machine. Inconsistent compile..."
Does it mean VSCode is using it's own copy as 2.3.4 stashed somewhere within its installation?
and thus it wants me to match my project's version 2.3.2 with 2.3.4.
Thank you.
Most helpful comment
I've installed typescript 1.8.10 globally
npm install -g [email protected]and it helped.