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

tsserver stopped working after any package install #452

Closed
ronitkrshah opened this issue Jan 30, 2024 · 6 comments
Closed

tsserver stopped working after any package install #452

ronitkrshah opened this issue Jan 30, 2024 · 6 comments

Comments

@ronitkrshah
Copy link

ronitkrshah commented Jan 30, 2024

Issue

(In React Native)

In the middle of coding if I add any package (npm/yarn) tsserver stops working. But in COC Status it shows that the server is active.
I have to run :CocRestart. After that it works

NVIM : Latest(Stable)
OS: Arch Linux
Kernel : LTS Release
Terminal: alacritty

How I Work

tmux with 3-4 windows

1 - Main Code
2 - Development Server yarn run android
3 - scrcpy for screen mirroring.

I use coc-prettier & coc-tsserver during development.

I can provide logs but please send me the command to get logs

@fannheyward
Copy link
Member

Similar issue #431.

Try this: install https://facebook.github.io/watchman/ and make sure watchman started after you open your project, coc.nvim will use watchman to watch files changes and notify language server, maybe this can help.

@ronitkrshah
Copy link
Author

Watchman is installed on my PC, but I'm unsure if it's actively monitoring my project. Additionally, I couldn't find a .watchmanconfig file in the project root. How can I confirm if it's working correctly?

@fannheyward
Copy link
Member

How can I confirm if it's working correctly?

After you open your project in vim, check :CocCommand workspace.showOutput watchman.

@ronitkrshah
Copy link
Author

[Info  - 11:59:37 PM] watchman watching project: /home/rks/Projects/TicTacToe
[Info  - 11:59:37 PM] subscribing "**/package.json" in /home/rks/Projects/TicTacToe
[Info  - 11:59:37 PM] subscribing "**/{.prettierrc,.prettierrc.json,.prettierrc.json5,.prettierrc.yaml,.prettierrc.yml,.prettierrc.toml,.prettierrc.js,.prettierrc.cjs,package.json,prettier.config.js,prettier.config.cjs,.editorconfig}" in /home/rks/Projects/TicTacToe
[Info  - 11:59:37 PM] subscribing "**/[tj]sconfig.json" in /home/rks/Projects/TicTacToe
[Info  - 11:59:37 PM] subscribing "**/package.json" in /home/rks/Projects/TicTacToe
[Info  - 11:59:37 PM] subscribing "**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}" in /home/rks/Projects/TicTacToe

After running that command i got this output. Seems like watchman is watching but still the issue exists

@ronitkrshah
Copy link
Author

@fannheyward I just uninstalled watchman ....and all my issues are solved dunno why

@chaozwn
Copy link

chaozwn commented Mar 20, 2024

add .watchman.json in your project root. so this issue can close now.

{
  "ignore_dirs": [
    "dist",
    "node_modules"
  ]
}

link: https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim#install-watchman-for-file-watching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants