Freshly generated Vite React TS template code shows errors in VSC but still runs

I’ve been trying to fix this for a year but no luck so far.

This is a freshly generated project using npm creat vite@latest and the template I chose was React with Typescript. No modification has been made. Yet the editor always shows a bunch of errors like this while the code still works just fine.

The same thing happens with the code generated with npx react-native init. It seems to be a problem with only TSX, not Typescript in general as Elysia with Bun JS still behaves as expected.

Globally installed TS version is 5.5.2. Workspace version is 5.5.4. Tried switching between the 2 but no difference.

Here’s my settings.json if you guys need it:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>{
"tabnine.experimentalAutoImports": true,
"files.autoSave": "afterDelay",
"workbench.startupEditor": "none",
"[python]": {
"editor.formatOnType": true
},
"explorer.confirmDelete": false,
"javascript.updateImportsOnFileMove.enabled": "always",
"git.mergeEditor": true,
"merge-conflict.autoNavigateNextConflict.enabled": true,
"git.confirmSync": false,
"editor.minimap.enabled": false,
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"prettier.jsxSingleQuote": true,
"prettier.useTabs": true,
"prettier.trailingComma": "all",
"workbench.iconTheme": "material-icon-theme",
"editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.inlineSuggest.enabled": true,
"github.copilot.enable": {
"*": true,
"plaintext": true,
"markdown": true,
"scminput": false
},
"workbench.editorAssociations": {
"*.csv": "gc-excelviewer-csv-editor"
},
"workbench.colorTheme": "Visual Studio Dark",
"prettier.singleAttributePerLine": true,
"prettier.singleQuote": true,
"prettier.semi": false,
"diffEditor.ignoreTrimWhitespace": true,
"omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current",
"telemetry.telemetryLevel": "off",
"peacock.favoriteColors": [
{
"name": "Angular Red",
"value": "#dd0531"
},
{
"name": "Azure Blue",
"value": "#007fff"
},
{
"name": "JavaScript Yellow",
"value": "#f9e64f"
},
{
"name": "Mandalorian Blue",
"value": "#1857a4"
},
{
"name": "Node Green",
"value": "#215732"
},
{
"name": "React Blue",
"value": "#61dafb"
},
{
"name": "Something Different",
"value": "#832561"
},
{
"name": "Svelte Orange",
"value": "#ff3d00"
},
{
"name": "Vue Green",
"value": "#42b883"
}
],
"typescript.updateImportsOnFileMove.enabled": "always",
"workbench.productIconTheme": "fluent-icons",
"window.zoomLevel": 1,
"security.workspace.trust.untrustedFiles": "open",
"github.copilot.editor.enableAutoCompletions": true,
"update.showReleaseNotes": false,
"typescript.disableAutomaticTypeAcquisition": true,
"typescript.experimental.updateImportsOnPaste": true,
"javascript.showUnused": false,
}
</code>
<code>{ "tabnine.experimentalAutoImports": true, "files.autoSave": "afterDelay", "workbench.startupEditor": "none", "[python]": { "editor.formatOnType": true }, "explorer.confirmDelete": false, "javascript.updateImportsOnFileMove.enabled": "always", "git.mergeEditor": true, "merge-conflict.autoNavigateNextConflict.enabled": true, "git.confirmSync": false, "editor.minimap.enabled": false, "emmet.includeLanguages": { "javascript": "javascriptreact", "typescript": "typescriptreact" }, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "editor.formatOnSave": true, "prettier.jsxSingleQuote": true, "prettier.useTabs": true, "prettier.trailingComma": "all", "workbench.iconTheme": "material-icon-theme", "editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace", "editor.fontLigatures": true, "editor.inlineSuggest.enabled": true, "github.copilot.enable": { "*": true, "plaintext": true, "markdown": true, "scminput": false }, "workbench.editorAssociations": { "*.csv": "gc-excelviewer-csv-editor" }, "workbench.colorTheme": "Visual Studio Dark", "prettier.singleAttributePerLine": true, "prettier.singleQuote": true, "prettier.semi": false, "diffEditor.ignoreTrimWhitespace": true, "omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current", "telemetry.telemetryLevel": "off", "peacock.favoriteColors": [ { "name": "Angular Red", "value": "#dd0531" }, { "name": "Azure Blue", "value": "#007fff" }, { "name": "JavaScript Yellow", "value": "#f9e64f" }, { "name": "Mandalorian Blue", "value": "#1857a4" }, { "name": "Node Green", "value": "#215732" }, { "name": "React Blue", "value": "#61dafb" }, { "name": "Something Different", "value": "#832561" }, { "name": "Svelte Orange", "value": "#ff3d00" }, { "name": "Vue Green", "value": "#42b883" } ], "typescript.updateImportsOnFileMove.enabled": "always", "workbench.productIconTheme": "fluent-icons", "window.zoomLevel": 1, "security.workspace.trust.untrustedFiles": "open", "github.copilot.editor.enableAutoCompletions": true, "update.showReleaseNotes": false, "typescript.disableAutomaticTypeAcquisition": true, "typescript.experimental.updateImportsOnPaste": true, "javascript.showUnused": false, } </code>
{
    "tabnine.experimentalAutoImports": true,
    "files.autoSave": "afterDelay",
    "workbench.startupEditor": "none",
    "[python]": {
        "editor.formatOnType": true
    },
    "explorer.confirmDelete": false,
    "javascript.updateImportsOnFileMove.enabled": "always",
    "git.mergeEditor": true,
    "merge-conflict.autoNavigateNextConflict.enabled": true,
    "git.confirmSync": false,
    "editor.minimap.enabled": false,
    "emmet.includeLanguages": {
        "javascript": "javascriptreact",
        "typescript": "typescriptreact"
    },
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescriptreact]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "editor.formatOnSave": true,
    "prettier.jsxSingleQuote": true,
    "prettier.useTabs": true,
    "prettier.trailingComma": "all",
    "workbench.iconTheme": "material-icon-theme",
    "editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace",
    "editor.fontLigatures": true,
    "editor.inlineSuggest.enabled": true,
    "github.copilot.enable": {
        "*": true,
        "plaintext": true,
        "markdown": true,
        "scminput": false
    },
    "workbench.editorAssociations": {
        "*.csv": "gc-excelviewer-csv-editor"
    },
    "workbench.colorTheme": "Visual Studio Dark",
    "prettier.singleAttributePerLine": true,
    "prettier.singleQuote": true,
    "prettier.semi": false,
    "diffEditor.ignoreTrimWhitespace": true,
    "omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current",
    "telemetry.telemetryLevel": "off",
    "peacock.favoriteColors": [
        {
            "name": "Angular Red",
            "value": "#dd0531"
        },
        {
            "name": "Azure Blue",
            "value": "#007fff"
        },
        {
            "name": "JavaScript Yellow",
            "value": "#f9e64f"
        },
        {
            "name": "Mandalorian Blue",
            "value": "#1857a4"
        },
        {
            "name": "Node Green",
            "value": "#215732"
        },
        {
            "name": "React Blue",
            "value": "#61dafb"
        },
        {
            "name": "Something Different",
            "value": "#832561"
        },
        {
            "name": "Svelte Orange",
            "value": "#ff3d00"
        },
        {
            "name": "Vue Green",
            "value": "#42b883"
        }
    ],
    "typescript.updateImportsOnFileMove.enabled": "always",
    "workbench.productIconTheme": "fluent-icons",
    "window.zoomLevel": 1,
    "security.workspace.trust.untrustedFiles": "open",
    "github.copilot.editor.enableAutoCompletions": true,
    "update.showReleaseNotes": false,
    "typescript.disableAutomaticTypeAcquisition": true,
    "typescript.experimental.updateImportsOnPaste": true,
    "javascript.showUnused": false,
}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật