Skip to content

TypeError: Cannot read property 'kind' of undefined #30269

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

Open
pocesar opened this issue Mar 8, 2019 · 0 comments
Open

TypeError: Cannot read property 'kind' of undefined #30269

pocesar opened this issue Mar 8, 2019 · 0 comments
Labels
Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output
Milestone

Comments

@pocesar
Copy link

pocesar commented Mar 8, 2019

TypeScript Version: 3.4.0-dev.20190307

Search Terms: typeerror, language server

Code

// Was renaming  a React component from GymForm to GymAddForm, removed the props from the interface, then the error appeared

// form.tsx
export interface FormProps {
 // had 
 // mode: 'add' | 'edit' 
 // here
}

export const GymAddForm: React.FunctionComponent<FormProps> = (props) => {
} // was GymForm, was editing another file that included this one

/*********************************/

// index.tsx
import { GymAddForm } from './form' // was GymForm
//...
    '/add': route({
      view: <GymAddForm /> // was <GymForm mode="add" />
    })
//...
[2019-03-08 04:35:12.667] [exthost] [error] [vscode.typescript-language-features] provider FAILED
[2019-03-08 04:35:12.668] [exthost] [error] Error: TypeScript Server Error (3.4.0-dev.20190307)
Cannot read property 'kind' of undefined
TypeError: Cannot read property 'kind' of undefined
    at pipelineEmitWithHint (tsserver.js:82991:39)
    at print (tsserver.js:82893:13)
    at Object.writeNode (tsserver.js:82826:13)
    at tsserver.js:105353:25
    at Object.mapToDisplayParts (tsserver.js:95290:13)
    at createSignatureHelpParameterForTypeParameter (tsserver.js:105351:35)
    at tsserver.js:105322:90
    at Array.map (<anonymous>)
    at itemInfoForTypeParameters (tsserver.js:105322:64)
    at getSignatureHelpItem (tsserver.js:105299:95)
    at tsserver.js:105272:79
    at Array.map (<anonymous>)
    at createSignatureHelpItems (tsserver.js:105272:36)
    at tsserver.js:104877:23
    at Object.runWithCancellationToken (tsserver.js:31334:28)
    at Object.getSignatureHelpItems (tsserver.js:104875:32)
    at Proxy.getSignatureHelpItems (tsserver.js:119615:37)
    at IOSession.Session.getSignatureHelpItems (tsserver.js:127702:62)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:126661:61)
    at tsserver.js:128123:88
    at IOSession.Session.executeWithRequestId (tsserver.js:128114:28)
    at IOSession.Session.executeCommand (tsserver.js:128123:33)
    at IOSession.Session.onMessage (tsserver.js:128145:35)
    at Interface.<anonymous> (tsserver.js:129406:27)
    at Interface.emit (events.js:182:13)
    at Interface._onLine (readline.js:290:10)
    at Interface._normalWrite (readline.js:433:12)
    at Socket.ondata (readline.js:149:10)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:279:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at Pipe.onread (net.js:636:20)
	at Function.create (f:\Users\Paulo\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:173227)
	at v.dispatchResponse (f:\Users\Paulo\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:178533)
	at v.dispatchMessage (f:\Users\Paulo\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:177285)
	at constructor._reader.onData.e (f:\Users\Paulo\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:176641)
	at u.fire (f:\Users\Paulo\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:43:416)
	at t.Reader.onLengthData (f:\Users\Paulo\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:182501)
	at Socket.t.Reader.constructor.e.on.e (f:\Users\Paulo\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:182149)
	at Socket.emit (events.js:182:13)
	at Socket.EventEmitter.emit (domain.js:442:20)
	at addChunk (_stream_readable.js:279:12)
	at readableAddChunk (_stream_readable.js:264:11)
	at Socket.Readable.push (_stream_readable.js:219:10)
	at Pipe.onread (net.js:636:20)

Playground Link:

Related Issues:
#6497 #15865 #27214 #27092 #28810

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: Type Display Bugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output Needs Investigation This issue needs a team member to investigate its status. and removed Domain: Type Display Bugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info labels Mar 8, 2019
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Mar 14, 2019
@RyanCavanaugh RyanCavanaugh removed the Needs Investigation This issue needs a team member to investigate its status. label Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output
Projects
None yet
Development

No branches or pull requests

3 participants