TypeScript TS服务器致命错误:无法读取未定义的属性(读取'flags')

vnjpjtjt  于 6个月前  发布在  TypeScript
关注(0)|答案(1)|浏览(44)

Bug

请在下面的部分填写相关信息,以帮助我们诊断问题。

TypeScript 版本: 5.4.0-dev.20231210

重现崩溃的步骤

TS 服务器日志

❗️ 服务器日志已禁用。为了帮助我们解决类似这样的崩溃问题,请通过以下设置启用日志记录:

"typescript.tsserver.log": "verbose"

启用此设置后,未来的崩溃报告将包括服务器日志。

TS 服务器错误堆栈

服务器: semantic

TypeError: Cannot read properties of undefined (reading 'flags')
    at getPropertyOfObjectType (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:59373:14)
    at getPropertyOfType (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:60000:14)
    at checkPropertyAccessExpressionOrQualifiedName (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:74966:14)
    at checkPropertyAccessExpression (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:74785:94)
    at checkExpressionWorker (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:80499:16)
    at checkExpression (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:80420:32)
    at checkExpressionCached (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:80090:28)
    at getTargetOfAliasLikeExpression (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:50951:5)
    at getTargetOfExportAssignment (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:50923:22)
    at getTargetOfAliasDeclaration (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:50978:16)
    at resolveAlias (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:51014:22)
    at resolveSymbol (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:51004:59)
    at resolveExternalModuleSymbol (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:51598:28)
    at getTargetOfImportEqualsDeclaration (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:50453:25)
    at getTargetOfAliasDeclaration (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:50964:16)
    at resolveAlias (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:51014:22)
    at getSymbolFlags (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:51045:61)
    at getSymbol2 (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49541:31)
    at resolveNameHelper (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49774:24)
    at resolveName (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49750:12)
    at resolveEntityName (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:51220:32)
    at getTargetOfAliasLikeExpression (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:50941:23)
    at getTargetOfExportAssignment (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:50923:22)
    at getTargetOfAliasDeclaration (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:50978:16)
    at resolveAlias (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:51014:22)
    at resolveSymbol (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:51004:59)
    at mergeSymbol (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49343:32)
    at /Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49453:37
    at Map.forEach (<anonymous>)
    at mergeSymbolTable (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49451:12)
    at mergeSymbol (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49365:9)
    at /Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49453:37
    at Map.forEach (<anonymous>)
    at mergeSymbolTable (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49451:12)
    at initializeTypeChecker (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:87794:9)
    at createTypeChecker (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:49105:3)
    at Object.getTypeChecker (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:122767:42)
    at synchronizeHostDataWorker (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:145575:13)
    at synchronizeHostData (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:145466:7)
    at Object.getProgram (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:145644:5)
    at ConfiguredProject2.updateGraphWorker (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:178301:41)
    at ConfiguredProject2.updateGraph (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:178150:32)
    at ConfiguredProject2.updateGraph (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:179402:24)
    at _ProjectService.createLoadAndUpdateConfiguredProject (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:181139:13)
    at _ProjectService.assignProjectToOpenedScriptInfo (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:182236:26)
    at /Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:182516:64
    at flatMap (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:2604:17)
    at _ProjectService.applyChangesInOpenFiles (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:182516:24)
    at updateOpen (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:183718:29)
    at /Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:186326:69
    at IpcIOSession.executeWithRequestId (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:186318:14)
    at IpcIOSession.executeCommand (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:186326:29)
    at IpcIOSession.onMessage (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:186368:51)
    at process.<anonymous> (/Users/terryhill/.vscode/extensions/ms-vscode.vscode-typescript-next-5.4.20231210/node_modules/typescript/lib/tsserver.js:187977:14)
    at process.emit (node:events:513:28)
    at emit (node:internal/child_process:937:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

VS Code 版本:Code 1.85.0 (Universal) (af28b32d7e553898b2a91af498b1fb666fdebe0c, 2023-12-06T18:18:04.614Z)
操作系统版本:Darwin arm64 22.3.0
模式:
系统信息
| 项目 | 值 |
| ------ | ------ |
| CPUs | Apple M1 Max (10 x 24) |
| GPU状态 | 2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled |
| 平均负载 | 13, 21, 25 |
| 内存(系统) | 32.00GB (4.41GB free) |
| 进程参数 | --crash-reporter-id cccdf885-8e7f-4939-93f0-2262e8602702 |
| 屏幕阅读器 | no |
| VM | 0% |扩展(29)
| 扩展名 | 作者(省略)| 版本 |
| ------ | ------ | ------ |
| better-comments | aar | 3.0.2 |
| vscode-tailwindcss | bra | 0.10.3 |
| path-intellisense | chr | 2.8.5 |
| vscode-eslint | dba | 2.4.2 |
| es7-react-js-snippets | dsz | 4.4.3 |
| gitlens | eam | 14.5.2 |
| vscode-html-css | ecm | 1.13.1 |
| EditorConfig | Edi | 0.16.4 |
| prettier-vscode | esb | 10.1.0 |
| copilot | Git | 1.141.0 |
| copilot-chat | Git | 0.11.0 |
| copilot-labs | Git | 0.17.1121 |
| vscode-graphql-syntax | Gra | 1.2.2 |
| vscode-react-typescript | inf | 1.3.1 |
| path-autocomplete | ion | 1.25.0 |
| git-graph | mhu | 1.30.0 |
| cmake-tools | ms- | 1.16.32 |
| cpptools

bejyjqdl

bejyjqdl1#

我们肯定需要导致崩溃的代码。你能分享一个复现案例吗?谢谢!

相关问题