question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TS Server fatal error: Cannot read property 'flags' of undefined

See original GitHub issue

Issue Type: Bug

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

TypeError: Cannot read property 'flags' of undefined
    at Object.isGlobalScopeAugmentation (tsserver.js:13074:26)
    at initializeTypeChecker (tsserver.js:66347:33)
    at Object.createTypeChecker (tsserver.js:34785:9)
    at Object.getTypeChecker (tsserver.js:98416:79)
    at synchronizeHostData (tsserver.js:135228:21)
    at Proxy.getProgram (tsserver.js:135310:13)
    at InferredProject.Project.updateGraphWorker (tsserver.js:139786:53)
    at InferredProject.Project.updateGraph (tsserver.js:139729:42)
    at ProjectService.assignOrphanScriptInfoToInferredProject (tsserver.js:141705:25)
    at ProjectService.assignProjectToOpenedScriptInfo (tsserver.js:143132:26)
    at tsserver.js:143396:107
    at Object.mapDefined (tsserver.js:562:30)
    at ProjectService.applyChangesInOpenFiles (tsserver.js:143396:48)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (tsserver.js:144260:46)
    at tsserver.js:146003:88
    at IOSession.Session.executeWithRequestId (tsserver.js:145994:28)
    at IOSession.Session.executeCommand (tsserver.js:146003:33)
    at IOSession.Session.onMessage (tsserver.js:146027:35)
    at Interface.<anonymous> (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)

VS Code version: Code - Insiders 1.45.0-insider (bd262894bbaac5156d5bf832160b7056c91decea, 2020-04-22T18:26:38.140Z) OS version: Darwin x64 19.4.0

System Info
Item Value
CPUs Intel® Core™ i9-8950HK CPU @ 2.90GHz (12 x 2900)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 10, 15, 10
Memory (System) 32.00GB (4.50GB free)
Process Argv -psn_0_6813311
Screen Reader no
VM 14%
Extensions (32)
Extension Author (truncated) Version
rainbow-brackets 2gu 0.0.6
vscode-openapi 42C 3.0.1
vscode-apollo apo 1.15.3
svelte-intellisense ard 0.7.1
swagger-viewer Arj 2.2.2
toml be5 0.4.0
gitlens eam 10.2.1
vsc-material-theme Equ 32.5.0
vsc-material-theme-icons equ 1.1.4
prettier-vscode esb 4.5.0
vscode-pull-request-github Git 0.15.0
svelte-vscode Jam 0.9.3
vscode-styled-components jpo 0.0.29
vscode-deno jus 1.6.0
dotenv mik 1.0.1
vscode-azureappservice ms- 0.16.5
vscode-docker ms- 1.1.0
vscode-kubernetes-tools ms- 1.1.1
azure-account ms- 0.8.9
Go ms- 0.14.1
js-debug-companion ms- 0.0.4
vsliveshare ms- 1.0.2048
debugger-for-chrome msj 4.12.6
vscode-versionlens pfl 0.25.0
material-icon-theme PKi 4.0.1
vscode-graphql Pri 0.2.14
vscode-yaml red 0.7.2
code-settings-sync Sha 3.4.3
markdown-jira-preview tra 0.0.1
alphabetical-sorter ue 2.0.1
quokka-vscode Wal 1.0.288
json Zai 1.0.4

(4 theme extensions excluded)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielRosenwassercommented, May 1, 2020

Ping @admmasters, any update?

0reactions
sandersncommented, Jun 29, 2020

My first guess for the cause is an incorrect tree that hasn’t had parent pointers set. It’s possible that a fix for #38556 will also fix this, but it’s hard to know without a repro.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TS Server fatal error: Cannot read property 'flags' of undefined
Issue Type: Bug TypeScript Version: 3.8.3 Steps to reproduce crash Create a new Preact / Typescript project (npx preact-cli create ...
Read more >
Cannot read property 'flags' of undefined : WEB-18383
typescript compiler throw error: Error:Error has occurred in the compile process TypeError: Cannot read property 'flags' of undefined ; State, Won't fix.
Read more >
ERROR in : TypeError: Cannot read property 'flags' of undefined
I am doing migration for angular, here is the previous package.json posted: "name": "test123", "version": "0.0.0", "license": "MIT", ...
Read more >
cannot read property 'insert' of undefined npm install - You.com
Disabling all extensions does not help. TS Server Error Stack. TypeError: Cannot read property 'flags' ...
Read more >
Fresh install of Angular, getting error when creating project
The "undefined" in the error is referencing the word "server". You run ng with the argument "server" and it looks for server inside...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found