Skip to content
New issue

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

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

Already on GitHub? # to your account

TS Server fatal error: Cannot read property 'indexOf' of undefined #116981

Closed
DougCal opened this issue Feb 18, 2021 · 2 comments
Closed

TS Server fatal error: Cannot read property 'indexOf' of undefined #116981

DougCal opened this issue Feb 18, 2021 · 2 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@DougCal
Copy link

DougCal commented Feb 18, 2021

Issue Type: Bug

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

TypeScript Version: 4.1.4

Steps to reproduce crash
1.
2.
3.

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 'indexOf' of undefined
    at Object.parsePackageName (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:39472:30)
    at ConfiguredProject.Project.enablePlugin (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:151962:24)
    at ConfiguredProject.enablePluginsWithOptions (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:152477:30)
    at ProjectService.loadConfiguredProject (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:154206:25)
    at ProjectService.createAndLoadConfiguredProject (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:154145:22)
    at ProjectService.createLoadAndUpdateConfiguredProject (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:154150:36)
    at ProjectService.assignProjectToOpenedScriptInfo (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:155055:44)
    at /Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:155395:97
    at Object.flatMap (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:513:25)
    at ProjectService.applyChangesInOpenFiles (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:155395:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:156413:46)
    at /Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:158286:88
    at IOSession.Session.executeWithRequestId (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:158277:28)
    at IOSession.Session.executeCommand (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:158286:33)
    at IOSession.Session.onMessage (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:158310:35)
    at Interface.<anonymous> (/Users/john/Documents/mothership/project44-api/node_modules/typescript/lib/tsserver.js:160520:27)
    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 1.53.2 (622cb03, 2021-02-11T11:45:54.515Z)
OS version: Darwin x64 20.2.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 3, 3
Memory (System) 16.00GB (1.08GB free)
Process Argv --crash-reporter-id 26f5d4d1-b0c3-4e57-b5ea-b96279c49393
Screen Reader no
VM 0%
Extensions (20)
Extension Author (truncated) Version
better-toml bun 0.3.2
npm-intellisense chr 1.3.1
vscode-eslint dba 2.1.14
gitlens eam 11.2.1
vscode-npm-script eg2 0.3.16
prettier-vscode esb 5.9.2
vscode-jest-runner fir 0.4.31
vscode-pull-request-github Git 0.23.1
go gol 0.22.1
gc-excelviewer Gra 3.0.41
rainbow-csv mec 1.8.1
dotenv mik 1.0.1
vscode-docker ms- 1.10.0
python ms- 2021.2.576481509
jupyter ms- 2021.2.576440691
remote-containers ms- 0.158.0
vscode-typescript-next ms- 4.3.20210217
debugger-for-chrome msj 4.12.12
vsfire tob 1.4.1
pdf tom 1.1.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspyt653:30253241
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30256636
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt600cf:30251589
pythontbcf:30258532

@IllusionMH
Copy link
Contributor

/duplicate of #116219
Fix released with VS Code 1.53.2

@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants
@IllusionMH @DougCal and others