Skip to content
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

TS Server fatal error: Cannot destructure property 'name' of 'object null' as it is null. #37477

Closed
crubier opened this issue Mar 19, 2020 · 3 comments
Labels
External Relates to another program, environment, or user action which we cannot control.

Comments

@crubier
Copy link

crubier commented Mar 19, 2020

Issue Type: Bug

TypeScript Version: 3.7.5-pnpify
Steps to reproduce crash

  1. yarn pnpify --sdk
  2. start vscode
    TS Server Error Stack
TypeError: Cannot destructure property 'name' of 'object null' as it is null.
    at getPackageInformation (/Users/vincent/Code/sterblue1/.pnp.js:161357:5)
    at Object.getPackageInformation (/Users/vincent/Code/sterblue1/.pnp.js:161676:20)
    at getPnpTypeRoots (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:27785:42)
    at getDefaultTypeRoots (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:27801:24)
    at getEffectiveTypeRoots (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:27754:20)
    at Object.getAutomaticTypeDirectiveNames (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:27931:29)
    at ConfiguredProject.Project.removeExistingTypings (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:135182:35)
    at ConfiguredProject.Project.removeLocalTypingsFromTypeAcquisition (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:134885:83)
    at ConfiguredProject.setTypeAcquisition (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:136053:45)
    at ProjectService.addFilesToNonInferredProject (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:137448:25)
    at ProjectService.updateRootAndOptionsOfNonInferredProject (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:137595:22)
    at ProjectService.loadConfiguredProject (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:137531:22)
    at ProjectService.createAndLoadConfiguredProject (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:137471:22)
    at ProjectService.createLoadAndUpdateConfiguredProject (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:137476:36)
    at ProjectService.assignProjectToOpenedScriptInfo (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:138301:44)
    at /Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:138532:107
    at Object.mapDefined (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:565:30)
    at ProjectService.applyChangesInOpenFiles (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:138532:48)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:139386:46)
    at /Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:141044:88
    at IOSession.Session.executeWithRequestId (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:141035:28)
    at IOSession.Session.executeCommand (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:141044:33)
    at IOSession.Session.onMessage (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:141067:35)
    at Interface.<anonymous> (/Users/vincent/Code/sterblue1/.yarn/cache/typescript-patch-7f9fbec647-2.zip/node_modules/typescript/lib/tsserver.js:142382: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 1.43.1 (fe22a9645b44368865c0ba92e2fb881ff1afce94, 2020-03-18T07:01:41.240Z)
OS version: Darwin x64 19.3.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2200)
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) 48, 25, 16
Memory (System) 16.00GB (2.43GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (22)
Extension Author (truncated) Version
vscode-browser-preview auc 0.5.9
better-toml bun 0.3.2
gltf-vscode ces 2.2.10
vscode-markdownlint Dav 0.34.0
vscode-eslint dba 2.1.1
gitlens eam 10.2.1
EditorConfig Edi 0.14.4
prettier-vscode esb 3.20.0
graphql-for-vscode kum 1.15.3
auto-dark-mode Lin 0.1.7
MagicPython mag 1.1.0
terraform mau 1.4.0
git-graph mhu 1.21.0
vscode-docker ms- 1.0.0
vscode-kubernetes-tools ms- 1.1.0
vscode-postgresql ms- 0.2.0
python ms- 2020.2.64397
debugger-for-chrome msj 4.12.6
autodocstring njp 0.4.0
vscode-yaml red 0.7.2
open-in-browser tec 2.0.0
vscode-icons vsc 10.0.0
@mjbvz mjbvz transferred this issue from microsoft/vscode Mar 19, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Mar 19, 2020

Do you see this with TypeScript 3.8.3+

What about if you update your workspace to use typescript@next by installing this extension

@RyanCavanaugh RyanCavanaugh added the External Relates to another program, environment, or user action which we cannot control. label Mar 19, 2020
@RyanCavanaugh
Copy link
Member

getPackageInformation is not part of our codebase. This seems to be a Yarn PnP API

@typescript-bot
Copy link
Collaborator

This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Relates to another program, environment, or user action which we cannot control.
Projects
None yet
Development

No branches or pull requests

4 participants