microsoft / microsoft/TypeScript

Tsserver never picks up a new file

未关闭
#61,663 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Needs More Info
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

### 🔎 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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

未提供源文件、测试或可复现的项目。首先,在 node_modules 中创建新文件时检查 tsserver 日志,并将其与已经收到 intellisense 和 automatic-import 条目的文件进行比较。当新文件被发现并在不手动编写 import 或重启 tsserver 的情况下提供自动导入时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
devtools
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。