[英]Failed to load the TSLint library for the document in Visual Studio Code
I have installed the latest versions of Visual Studio Code, Node.js and Typescript on my Windows 10. Unfortunately, I am getting the following message in my terminal. 我已经在Windows 10上安装了最新版本的Visual Studio Code,Node.js和Typescript。不幸的是,我在终端中收到以下消息。
Failed to load the TSLint library for the document...
I tried installing the TSLint once again. 我尝试再次安装TSLint。
npm install -g tslint
And got the following message: 并得到以下消息:
npm WARN tslint@5.11.0 requires a peer of typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@2.29.0 requires a peer of typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev but none is installed. You must install peer dependencies yourself.
+ tslint@5.11.0
updated 1 package in 1.853s
Restarting the VSC doesn't help and I am still getting a message that TSLint cannot be loaded. 重新启动VSC并没有帮助,我仍然收到一条消息,提示无法加载TSLint。
tsutils
and typescript
are "peer" dependencies of TSLint, meaning TSLint requires that they be installed but won't do it for you _(this helps make sure TSLint uses the dependency versions you have, rather than providing confusingly different versions on its own). tsutils
和typescript
是TSLint的“对等”的依赖,这意味着TSLint要求他们安装好,但你不会做_(这有助于确保TSLint使用您已有的依赖版本,而不是提供自身容易混淆不同的版本) 。 Try: 尝试:
npm i tsutils typescript npm i tsutils打字稿
...to install them manually. ...以手动安装它们。
Isn't that error message informing you about the missing extension? 该错误消息不是通知您缺少扩展名的信息吗? It bundles its own version of TSLint. 它捆绑了自己的TSLint版本。
Try installing the vscode-tslint extension. 尝试安装vscode-tslint扩展。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.