Skip to content

tsserver seems to watch entire home directory #60989

Open
@sweber83

Description

🔎 Search Terms

When developing on a typescript project I keep needing to restart the tsserver because it always gets unresponsive after the first iteration checking my opened file.
Today I finally had a look at the log file.
I found the following lines (redacted my user name):

DirectoryWatcher:: Added:: WatchInfo: /home/REDACTED/ 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache
...
Info 72523[16:05:52.615] sysLog:: /home/REDACTED/some/file/somewhere/in/my/home:: Defaulting to watchFile
...
Elapsed:: 263231.954163ms DirectoryWatcher:: Added:: WatchInfo: /home/REDACTED/ 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache

The line in between the ellipsis is repeated hundred thousands of times, apparently watching all the files in my home directory.
What could be the issue?

🕗 Version & Regression Information

  • This behavior was observed in version 5.3.3, 5.4.5 & 5.7.3

⏯ Playground Link

No response

💻 Code

// Your code here

🙁 Actual behavior

🙂 Expected behavior

Additional information about the issue

No response

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions