You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
We would really need a repro, or at least some logs
The issue is that it has happened in mulitple files and not consistent at all. I have no idea how to repoduce it, it just randomly happens at some point in the TSX file I am working in. And tried backtracing my steps. I could try to get some logs
Log does indeed show something weird happen, but it's super hard to guess what's going on. Log + repo might be enough to reconstruct what's happening.
Sadly I have no idea how to reproduce it, I've tried many things. It's almost as if the LSP randomly tries to re-index all types, but fails to index react types. Perhaps something with pnpm, will try a few more things
package fourslash_test
import (
"testing""github.com/microsoft/typescript-go/internal/fourslash""github.com/microsoft/typescript-go/internal/testutil"
)
// Regression test for https://github.com/microsoft/typescript-go/issues/3638//// A `textDocument/hover` on a JSX intrinsic element used to cause the// subsequent `textDocument/diagnostic` pull to spuriously report// TS2304: Cannot find name 'div'.funcTestHoverThenDiagnosticsJsxIntrinsic(t*testing.T) {
t.Parallel()
defertestutil.RecoverAndFail(t, "Panic on fourslash test")
constcontent=`// @Filename: /tsconfig.json{ "compilerOptions": { "strict": true, "jsx": "preserve" } }// @Filename: /jsx.d.tsdeclare namespace JSX { interface Element { } interface IntrinsicElements { div: any }}// @Filename: /file.tsxexport default function Home() { return <di/*1*/v>hi</div>;}`f, done:=fourslash.NewFourslash(t, nil/*capabilities*/, content)
deferdone()
// Hover on the intrinsic element first...f.VerifyQuickInfoAt(t, "1", "(property) JSX.IntrinsicElements.div: any", "")
// ...then a subsequent diagnostic pull must not invent a TS2304 for `div`.f.VerifyNoErrors(t)
}
Activity
jakebailey commentedon Apr 28, 2026
We would really need a repro, or at least some logs
Netail commentedon Apr 28, 2026
The issue is that it has happened in mulitple files and not consistent at all. I have no idea how to repoduce it, it just randomly happens at some point in the TSX file I am working in. And tried backtracing my steps. I could try to get some logs
[-]Cannot find name 'div'.[/-][+]Cannot find name html element.[/+]Netail commentedon Apr 30, 2026
The logs:
typescript-go.log
It happened by doing nothing, so I had a big TSX file open and just waited. And then out of nowhere it started throwing the error on a html element.
RyanCavanaugh commentedon May 6, 2026
Log does indeed show something weird happen, but it's super hard to guess what's going on. Log + repo might be enough to reconstruct what's happening.
Netail commentedon May 6, 2026
Sadly I have no idea how to reproduce it, I've tried many things. It's almost as if the LSP randomly tries to re-index all types, but fails to index react types. Perhaps something with pnpm, will try a few more things
Netail commentedon May 6, 2026
Okay, was able to reproduce it in https://github.com/Netail/repro-typescript-go-unknown-html-element. In the page.tsx (ts6 + tsgo vscode extension) Now I have to figure out the repro steps
Netail commentedon May 6, 2026
pnpm installin the repoapps\my-app\app\page.tsxapps\my-app\app\page.tsxagainWas able to reproduce it will a fresh install +
pnpm install, without runningpnpm devonce or making changes in filesDesktop.2026.05.07.-.00.24.09.01.mp4
RyanCavanaugh commentedon May 6, 2026
Confirmed locally, investigating. Great repro, thanks!
Netail commentedon May 6, 2026
Awesome, thanks Ryan! Good luck :)
RyanCavanaugh commentedon May 7, 2026
fourslash test
jakebailey commentedon May 7, 2026
I suspect #3435 would fix this by way of not sharing checkers.