microsoft / microsoft/TypeScript

Tsserver never picks up a new file

Open
#61,663 1 comment 0 reactions 0 assignees View on GitHub
Needs More Info
Dominant language
Go
Stars
111k
Forks
14.3k
PR merge metrics
PR metrics pending

Description

### 🔎 Search Terms

"tsserver does not pick up new files"

### 🕗 Version & Regression Information

This has been an issue for as long as I can remember.

### ⏯ Playground Link

_No response_

### 💻 Code

_No response_

### 🙁 Actual behavior

I have an issue where tsserver (using code-server ide) refuses to pick up a new file in a node_modules for the purpose of intellisense / automatic imports. It picks up every other file in the same project and even the same folder, they all work fine with intellisense and automatic imports, but it will not pick up this one new file. Looking through the logs there is a relevant line for every other file in this project, but not the one I want. Not a single result in 50000 lines of logs if I ctrl+f the file name.

Manually typing in the import statement does work - the file is definitely there and valid and the ide recognizes it and picks up the correct types if I put it in manually.

Also restarting tsserver makes no difference no matter how many times I do it.

### 🙂 Expected behavior

Tsserver should pick up everything in node_modules.

### Additional information about the issue

I just don't even know how to begin to debug this.

Contributor guide

Open the contributing guide

Research direction

No source file, test, or reproducible project is provided. Start by examining tsserver logs while creating the new file in node_modules and compare it with files that already receive intellisense and automatic-import entries. Done means the new file is discovered and offered for automatic imports without manually writing the import or restarting tsserver.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.