8000 TS Server fatal error: Cannot read property 'lastIndexOf' of undefined · Issue #115905 · microsoft/vscode · GitHub
[go: up one dir, main page]

Skip to content
TS Server fatal error: Cannot read property 'lastIndexOf' of undefined #115905
@nanivijay

Description

@nanivijay

Issue Type: Bug

❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️

TypeScript Version: 4.2.0-dev.20210201

Steps to reproduce crash

  1. Open vscode
  2. Open client side typescript repo
  3. seeing the exception notification

TS Server Log
❗️Server logging disabled. To help us fix crashes like this, please enable logging by setting:

"typescript.tsserver.log": "verbose"

After enabling this setting, future crash reports will include the server log.

TS Server Error Stack
Server: semantic

TypeError: Cannot read property 'lastIndexOf' of undefined
    at Object.startsWith (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:2024:20)
    at isNodeModulesOrScopedPackageDirectory (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:19057:65)
    at guessDirectorySymlink (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:19045:17)
    at Object.discoverProbableSymlinks (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:19033:22)
    at ConfiguredProject.Project.getSymlinkCache (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:153320:61)
    at Object.getSymlinkCache (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:108792:29)
    at fileOrDirectoryExistsUsingSource (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:108923:37)
    at Object.host.compilerHost.directoryExists (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:108835:24)
    at Object.directoryProbablyExists (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:18089:46)
    at c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:39092:46
    at Object.firstDefined (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:220:26)
    at primaryLookup (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:39089:27)
    at Object.resolveTypeReferenceDirective (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:39062:24)
    at c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154672:112
    at Object.map (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:451:29)
    at Function.AutoImportProviderProject.getRootFileNames (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154672:42)
    at Function.AutoImportProviderProject.create (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154701:38)
    at ConfiguredProject.Project.getPackageJsonAutoImportProvider (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154515:77)
    at ConfiguredProject.Project.updateGraph (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:153917:26)
    at ConfiguredProject.updateGraph (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:154848:63)
    at ProjectService.createLoadAndUpdateConfiguredProject (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:156598:25)
    at ProjectService.assignProjectToOpenedScriptInfo (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:157539:44)
    at c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:157879:97
    at Object.flatMap (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:515:25)
    at ProjectService.applyChangesInOpenFiles (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:157879:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:158934:46)
    at c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:160818:88
    at IOSession.Session.executeWithRequestId (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:160809:28)
    at IOSession.Session.executeCommand (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:160818:33)
    at IOSession.Session.onMessage (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:160844:35)
    at Interface.<anonymous> (c:\Users\viotti\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:163507:31)
    at Interface.emit (events.js:315:20)
    at Interface._onLine (readline.js:329:10)
    at Interface._normalWrite (readline.js:474:12)
    at Socket.ondata (readline.js:186:10)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:186:23)

VS Code version: Code - Insiders 1.54.0-insider (52838cf, 2021-02-05T05:17:50.117Z)
OS version: Windows_NT x64 10.0.21306

System Info
Item Value
CPUs Intel(R) Xeon(R) W-2135 CPU @ 3.70GHz (12 x 3696)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 63.73GB (43.58GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (23)
Extension Author (truncated) Version
npm-intellisense chr 1.3.1
path-intellisense chr 2.3.0
jsontotype dan 0.0.3
vscode-eslint dba 2.1.14
githistory don 0.6.14
gitlens eam 11.2.1
vscode-npm-script eg2 0.3.13
prettier-vscode esb 5.9.1
vscode-jest-runner fir 0.4.31
prettify-json moh 0.0.3
azure-pipelines ms- 1.183.0
csharp ms- 1.23.9
azure-account ms- 0.9.5
js-debug-companion ms- 1.0.8
vs-keybindings ms- 0.2.0
team ms- 1.161.1
debugger-for-chrome msj 4.12.12
vs-code-prettier-eslint rve 0.4.1
vscode-coverage-gutters rya 2.6.0
code-settings-sync Sha 3.4.3
sort-lines Tyr 1.9.0
gitblame wad 6.0.2
vscode-import-cost wix 2.15.0

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0