tsc 编译器和 VS Code 的语言服务之间的版本不匹配 [英] Version mismatch between tsc compiler and VS Code's language service

查看:31
本文介绍了tsc 编译器和 VS Code 的语言服务之间的版本不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用 Visual Studio Code,当我创建一个名为 index.html 的新文件时,我看到了这条警告消息

I just started playing with Visual Studio Code and when I created a new file called index.html, I am shown this warning message

全局安装的 tsc 编译器 (1.0.3.0) 和 VS Code 的语言服务 (1.8.10) 之间存在版本不匹配

有人可以指导我如何解决这个问题.

Can someone please guide me what i have to do to fix this.

这是严重的还是我可以忽略.我用谷歌搜索但找不到太多信息

Is this serious or I can ignore. I googled but could not get much info

谢谢

推荐答案

我将此添加到我的 settings.json 文件中,通过 preferences > 访问工作区设置:

I added this to my settings.json file, accessed through preferences > Workspace Settings :

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

现在我不再收到此错误,并且在屏幕的右下角显示了我已安装的当前版本的 Typescript.

now I no longer receive this error and in the bottom right corner of my screen it shows the current version of Typescript that I have installed.

这篇关于tsc 编译器和 VS Code 的语言服务之间的版本不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆