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

Watch cannot handle large amount of file changes #58342

Open
2767mr opened this issue Apr 27, 2024 · 1 comment
Open

Watch cannot handle large amount of file changes #58342

2767mr opened this issue Apr 27, 2024 · 1 comment
Assignees
Labels
Needs Investigation This issue needs a team member to investigate its status.

Comments

@2767mr
Copy link

2767mr commented Apr 27, 2024

🔎 Search Terms

watch, tsc, tsserver, files, Cannot find module, or its corresponding type declarations

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about (tsc v5.4.5)

⏯ Playground Link

https://github.com/2767mr/tsbug

💻 Code

No response

🙁 Actual behavior

After deleting and regenerating a large amount of auto-generated files, typescript reports an error as seen below when using --watch. This also affects the VS Code tsserver.

src/main.ts:1:32 - error TS2307: Cannot find module './app/services/generated' or its corresponding type declarations.

1 import { TranslationDto } from "./app/services/generated";

🙂 Expected behavior

Typescript should pick up new files even when there are a lot of them.

Additional information about the issue

Reproduction:

  1. Clone https://github.com/2767mr/tsbug
  2. npm install
  3. Open one terminal with npm run watch
  4. After a few seconds, open another terminal with npm run copy

Here is the tsserver log that is created when doing this: tsserver.log

Possibly related issues:
#57330
#22710
#37514
#54511 (same use case as we have - but on our end it does not work at all instead of being slow)

@2767mr
Copy link
Author

2767mr commented Apr 27, 2024

Note that this bug does not happen if you reduce the amount of files that will be copied by npm run copy

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label May 2, 2024
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 5.6.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Investigation This issue needs a team member to investigate its status.
Projects
None yet
Development

No branches or pull requests

3 participants