Several Panics with ts/tsx files

Hey, those panics aren’t coming from Cursor. They’re coming from Microsoft’s TypeScript (Native Preview) extension (typescript-go). You can tell from the stack traces, they’re Go runtime panics in the tsgo LSP server. Cursor is just showing them via standard VS Code error reporting.

About the semanticTokens panic token spans multiple lines. It’s tracked in Panic Alert Notification when Cursor edits some file and opening that file causes panic. · Issue #3621 · microsoft/typescript-go · GitHub, and the fix is already merged upstream in PR #3684 from May 2 ls/semantictokens: skip multi-line tokens instead of panicking by SAY-5 · Pull Request #3684 · microsoft/typescript-go · GitHub. The foldingRange slice bounds out of range panic is the same kind of bug in tsgo.

What to do:

  • Open Extensions with Cmd+Shift+X, find TypeScript (Native Preview), and update to the latest version, or reinstall it.
  • Restart Cursor.

If the foldingRange panic still reproduces after updating, please open a separate issue in Issues · microsoft/typescript-go · GitHub with an LSP trace. They’ll likely fix it faster there.

There’s also a similar thread with the same context here Typescript-go error.