profile
viewpoint

Ask questionsTS Server fatal error: Cannot read property 'get' of undefined

TypeScript Version: 3.8.3 Steps to reproduce crash 1. 2. 3. TS Server Error Stack

TypeError: Cannot read property 'get' of undefined
    at resolveModuleNamesReusingOldState (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98026:92)
    at processImportedModules (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99448:35)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99191:17)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99418:21
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at processLibReferenceDirectives (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99413:16)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99188:21)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99418:21
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at processLibReferenceDirectives (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99413:16)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99188:21)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99418:21
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at processLibReferenceDirectives (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99413:16)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99188:21)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99418:21
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at processLibReferenceDirectives (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99413:16)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99188:21)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99418:21
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at processLibReferenceDirectives (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99413:16)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99188:21)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99418:21
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at processLibReferenceDirectives (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99413:16)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99188:21)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99418:21
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at processLibReferenceDirectives (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99413:16)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99188:21)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99418:21
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at processLibReferenceDirectives (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99413:16)
    at findSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99188:21)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:85
    at getSourceFileFromReferenceWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98987:34)
    at processSourceFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:99020:13)
    at processRootFile (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:98843:13)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:97809:60
    at Object.forEach (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167:30)
    at Object.createProgram (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:97809:16)
    at synchronizeHostData (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:135218:26)
    at Object.getProgram (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:135310:13)
    at InferredProject.Project.updateGraphWorker (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:139786:53)
    at InferredProject.Project.updateGraph (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:139729:42)
    at updateProjectIfDirty (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:141076:45)
    at Array.forEach (<anonymous>)
    at ProjectService.assignProjectToOpenedScriptInfo (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:143127:41)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:143396:107
    at Object.mapDefined (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:562:30)
    at ProjectService.applyChangesInOpenFiles (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:143396:48)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:144260:46)
    at c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146003:88
    at IOSession.Session.executeWithRequestId (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:145994:28)
    at IOSession.Session.executeCommand (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146003:33)
    at IOSession.Session.onMessage (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146027:35)
    at Interface.<anonymous> (c:\Users\Gun Gun Febrianza\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:147342:27)
    at Interface.emit (events.js:203:13)
    at Interface._onLine (readline.js:316:10)
    at Interface._normalWrite (readline.js:461:12)
    at Socket.ondata (readline.js:172:10)
    at Socket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
```We have written the needed data into your clipboard because it was too large to send. Please paste.
microsoft/TypeScript

Answer questions mjbvz

Do you see this in VS Code insiders using TypeScript 3.9+?

useful!

Related questions

Why `window.location.reload(true)` is deprecated? hot 8
Cannot export { ... } interface when --isolatedModules is passed hot 3
TS2739: Type is missing the following properties from type hot 3
TSC Strict mode error TS2722: Cannot invoke an object which is possibly 'undefined'. hot 2
This condition will always return 'false' since the types have no overlap. hot 2
Allow extending types referenced through interfaces hot 2
Suppressing "The import path cannot end with a '.ts' extension" error? hot 2
Property 'setState' does not exist on type 'App'.ts(2339) hot 2
Cannot find name 'MediaRecorder'. hot 2
tsc.ps1 cannot be loaded. The file ... is not digitally signed hot 2
error TS1183: An implementation cannot be declared in ambient contexts. hot 2
3.7.2 Promise.all does infers base type of interfaces rather than actual interface hot 1
Skip typechecking; only emit (support `--transpileOnly` in `tsc`, re-open of #4176) hot 1
tsc crash with node OOM hot 1
error TS2688: Cannot find type definition file for...random paths. hot 1
Github User Rank List