简体   繁体   English

vscode在jsconfig.json文件中显示typescript相关问题

[英]vscode shows typescript related problems in jsconfig.json file

I set up a normal create-react-app project and add jsconfig.json to the root directory.我建立了一个普通的 create-react-app 项目并将 jsconfig.json 添加到根目录。 But it shows the error which is typescript related.但它显示了与 typescript 相关的错误。 Vscode 终端中的问题 Here is the jsconfig.json file这是 jsconfig.json 文件

jsconfig.json 配置

Folder structure文件夹结构

在此处输入图像描述

Can anyone help me with this?谁能帮我这个?

Thanks, Prakhil谢谢,普拉希尔

Open the settings.json file, add the below line and then save.打开 settings.json 文件,添加以下行然后保存。

 "json.schemas": [
      { 
        "$schema": "https://json.schemastore.org/jsconfig" 
      }
    ]

在此处输入图像描述

I had a similar error and solved it by changing the extension of the jsconfig.json file to jsconfig.json c我有一个类似的错误并通过将 jsconfig.json 文件的扩展名更改为 jsconfig.json c来解决它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM