8000 Error when writing the word "class" in a typescript file · Issue #726 · typescript-language-server/typescript-language-server · GitHub
[go: up one dir, main page]

Skip to content

Error when writing the word "class" in a typescript file #726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Zeioth opened this issue May 31, 2023 · 5 comments
Closed

Error when writing the word "class" in a typescript file #726

Zeioth opened this issue May 31, 2023 · 5 comments

Comments

@Zeioth
Copy link
Zeioth commented May 31, 2023

I get this error every time I write "class", which repeats insistently.
screenshot_2023-05-31_03-42-03_907581516

All other keywords like function, let, etc seem to work fine.

@Zeioth
Copy link
Author
Zeioth commented May 31, 2023

I'm gonna copy it here, in case it is easier for you to read:

TypeError: Cannot read properties of undefined (reading 'length')
    at Object.find (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:267:35)
    at getAdjustedLocationForClass (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:108430:38)
    at getAdjustedLocationForDeclaration (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:108464:28)
    at getAdjustedLocation (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:108566:28)
    at getAdjustedReferenceLocation (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:108737:16)
    at Object.getMeaningFromLocation (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:107808:16)
    at getIntersectingMeaningFromDeclarations (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:117352:34)
    at getReferencedSymbolsForSymbol (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:116262:44)
    at Object.getReferencedSymbolsForNode (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:116073:34)
    at Object.getReferenceEntriesForNode (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:115792:40)
    at getSemanticDocumentHighlights (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:114438:57)
    at Object.getDocumentHighlights (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:114426:20)
    at Object.getDocumentHighlights (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:139013:42)
    at IOSession.Session.getDocumentHighlights (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:148660:71)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:148043:61)
    at /home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:149576:88
    at IOSession.Session.executeWithRequestId (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:149567:28)
    at IOSession.Session.executeCommand (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:149576:33)
    at IOSession.Session.onMessage (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:149600:35)
    at Interface.<anonymous> (/home/zeioth/example-project/frontend/node_modules/typescript/lib/tsserver.js:150916:27)
    at Interface.emit (node:events:513:28)
    at Interface._onLine (node:readline:491:10)
    at Interface._normalWrite (node:readline:665:12)
    at Socket.ondata (node:readline:272:10)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)            

@Zeioth Zeioth changed the title error when writing the word "class" in a typescript file. error when writing the word "class" in a typescript file May 31, 2023
@Zeioth Zeioth changed the title error when writing the word "class" in a typescript file Error when writing the word "class" in a typescript file May 31, 2023
@rchl
Copy link
Member
rchl commented Jun 25, 2023

Duplicate of #694

@rchl rchl marked this as a duplicate of #694 Jun 25, 2023
@rchl rchl closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2023
@rchl
Copy link
Member
rchl commented Jun 25, 2023

Actually, from the stack trace it seems like this is specific to document highlights rather than code actions.

Are you able to provide LSP logs for this?

@rchl rchl reopened this Jun 25, 2023
@rchl
Copy link
Member
rchl commented Jun 25, 2023

Or share the project that reproduces (although not sure if it would also reproduce in my editor)?

@rchl
Copy link
Member
rchl commented Nov 13, 2023

Closing due to not enough info and no response.

@rchl rchl closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0