启动 tsserver vs code 时失败,尽管它选择了正确的版本。
2023-08-25 16:18:16.644 [info] Starting TS Server undefined
2023-08-25 16:18:16.644 [info] Using tsserver from: c:\Users\Stratos\Desktop\QA\repos\lh\cypress\node_modules\typescript\lib\tsserver.js undefined
2023-08-25 16:18:16.644 [info] <syntax> Forking...
2023-08-25 16:18:16.644 [info] <syntax> Starting...
2023-08-25 16:18:16.644 [info] <semantic> Forking...
2023-08-25 16:18:16.644 [info] <semantic> Starting...
2023-08-25 16:18:16.645 [error] TSServer exited. Code: null. Signal: SIGTERM
来自settings.json
:
"typescript.tsdk": "c:\\Users\\Stratos\\Desktop\\QA\\repos\\lh\\cypress\\node_modules\\typescript\\lib",
实际文件路径:
C:\Users\Stratos\Desktop\QA\repos\lh\cypress\node_modules\typescript\lib\tsserver.js
最佳答案
正在跟踪的问题票证是 TSServer exited #191441 .
One user reports他们可以通过在禁用扩展的情况下重新加载 VS Code(使用 command palette 中的开发人员:在禁用扩展的情况下重新加载
命令),然后关闭 VS Code,然后重新打开它来解决该问题。既然这样有效,我也想知道在命令面板中使用 TypeScript: Restart TS Server 或 TypeScript: Reload Project 命令是否有效。这也可能与在 WSL 中运行有关。
One user reports当他们同时启用 Deno 扩展时,他们会遇到类似的问题。
关于typescript - 在 VS Code 中启动 tsserver 时出错 : "TSServer exited. Code: null. Signal: SIGTERM",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76978579/