neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

The TypeScript service language died 5 times right after it got started #387

Open nicobross opened 1 year ago

nicobross commented 1 year ago

Hi, every time I open a javascript file I have the following error message and completion doesn't work well.

image

and this is the error that I have in the coc-nvim.log

2022-07-27T20:08:59.441 ERROR (pid:607510) [completion-complete] - Complete error: tsc-javascript Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed at doWrite (_stream_writable.js:399:19) at writeOrBuffer (_stream_writable.js:387:5) at Socket.Writable.write (_stream_writable.js:318:11) at ForkedTsServerProcess.write (/home/bross/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:13385:29) at TypeScriptServiceClient.sendRequest (/home/bross/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:13913:28) at TypeScriptServiceClient.sendNextRequests (/home/bross/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:13900:14) at TypeScriptServiceClient.executeImpl (/home/bross/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:13893:10) at TypeScriptServiceClient.execute (/home/bross/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:13831:24) at /home/bross/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:9687:78 at BufferSyncSupport.interuptGetErr (/home/bross/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:12500:14) { code: 'ERR_STREAM_DESTROYED' }

I know there is already an issue https://github.com/neoclide/coc-tsserver/issues/372 with this problem, but the solution was angular related, and I don't have angular installed in my computer.

Could anyone please help me to tackle this issue?

nicobross commented 1 year ago

I've found that if I uninstall coc-clangd, tsserver starts working fine.

Does anyone happen to know why?

chemzqm commented 1 year ago

Could be not enough memory.

chemzqm commented 1 year ago

Tsserver crashed for some reason, checkout https://github.com/neoclide/coc-tsserver/blob/master/Readme.md#troubleshooting or try lastest typescript module.