Repository: deno
Issue: npm compat: typescript-language-server
Labels: bug,node compat

Version: Deno 1.42.0

typescript-language-server@4.3.3 fails to work correctly
```

2024-03-29T18:39:10.362 helix_lsp::transport [ERROR] typescript err <- "error: Uncaught (in promise) Error: tsserver process has exited (exit code: 1, signal: null). Stopping the server.\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at TsClient.onExit (file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:22503:17)\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:19177:20\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:18368:46\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at Set.forEach (<anonymous>)\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:18368:26\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:18081:46\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at Set.forEach (<anonymous>)\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at ChildProcess.<anonymous> (file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:18081:26)\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at ChildProcess.emit (ext:deno_node/_events.mjs:386:28)\n"
2024-03-29T18:39:10.363 helix_lsp::transport [ERROR] typescript err <- "    at ext:deno_node/internal/child_process.ts:180:16\n"
2024-03-29T18:39:10.366 helix_lsp::client [WARN] language server failed to terminate gracefully - server closed the stream
2024-03-29T18:39:10.366 helix_lsp::transport [ERROR] typescript err: <- StreamClosed
2024-03-29T18:39:10.366 helix_lsp::transport [ERROR] typescript err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2024-03-29T18:39:10.367 helix_lsp::client [WARN] language server failed to terminate gracefully - server closed the stream
2024-03-29T18:39:10.367 helix_lsp::transport [ERROR] gpt err: <- StreamClosed
2024-03-29T18:39:10.367 helix_lsp::transport [ERROR] gpt err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2024-03-29T18:39:11.326 helix_term::application [WARN] Received unregistration request for unsupported method: workspace/didChangeConfiguration
2024-03-29T18:39:11.326 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rangeFormatting
2024-03-29T18:39:11.326 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/onTypeFormatting
2024-03-29T18:39:11.326 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rename
2024-03-29T18:39:11.326 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/formatting
2024-03-29T18:39:11.326 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-03-29T18:39:11.326 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-03-29T18:39:11.326 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "error: Uncaught (in promise) Error: tsserver process has exited (exit code: 1, signal: null). Stopping the server.\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at TsClient.onExit (file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:22503:17)\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:19177:20\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:18368:46\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at Set.forEach (<anonymous>)\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:18368:26\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:18081:46\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at Set.forEach (<anonymous>)\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at ChildProcess.<anonymous> (file:///home/mrcool/dev/others/helix-gpt/node_modules/.deno/typescript-language-server@4.3.3/node_modules/typescript-language-server/lib/cli.mjs:18081:26)\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at ChildProcess.emit (ext:deno_node/_events.mjs:386:28)\n"
2024-03-29T18:39:12.800 helix_lsp::transport [ERROR] typescript err <- "    at ext:deno_node/internal/child_process.ts:180:16\n"
2024-03-29T18:39:12.803 helix_lsp::transport [ERROR] typescript err: <- StreamClosed
```

to test this , you need a project that have typescript installed in node_modules dir, since its seems required by the lsp, example add this to package.json 
```json
  "peerDependencies": {
    "typescript": "^5.0.0"
  }
```

then run a typescript file  with  helix for example, using this lsp
```
[language-server.typescript]
environment = {NO_COLOR = "1"}
command = "deno"
args = ["run","-A", "npm:typescript-language-server@4.3.3", "--stdio"]
```

if I use bunx for example it does work