Error: A FileHandle object was closed during garbage collection (ESLint)

Aberta
#650 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
eslint, node.js, typescript, vite
Domínio
devtools

Direção de pesquisa

The report points to Vite config loading from the ESLint configuration and open FileHandles for .vite/devtools/inspect/plugin-calls.bin and payloads.bin, but gives no repository files or reproducible project. Start by tracing the config loading path and finding where the Vite Devtools plugin opens these files; reproduce with the linked setup if possible. Done means eslint . exits without the FileHandle garbage collection errors and the handles are explicitly closed.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

pending triage
Describe the bug

When setting up Vite Devtools + Svelte in https://github.com/WarningImHack3r/svelte-changelog/commit/65c9f08163cc67eadc88bf0bbbe30519bd099080, I encountered this error when running eslint . in my project:

Oops! Something went wrong! :(

ESLint: 10.15.0

Error: A FileHandle object was closed during garbage collection. This used to be allowed with a deprecation warning but is now considered an error. Please close FileHandle objects explicitly. File descriptor: 18 (/Users/antoine/Developer/svelte-changelog/node_modules/.vite/devtools/inspect/plugin-calls.bin)

Oops! Something went wrong! :(

ESLint: 10.15.0

Error: A FileHandle object was closed during garbage collection. This used to be allowed with a deprecation warning but is now considered an error. Please close FileHandle objects explicitly. File descriptor: 17 (/Users/antoine/Developer/svelte-changelog/node_modules/.vite/devtools/inspect/payloads.bin)

I don't precisely know where this error comes from, what config causes this, or why it's only triggered by ESLint, but Claude says it's because my ESLint config loads the Vite config, and the Vite devtools plugin never releases handles on those files when the server is never actually booted.

I wasn't able to reproduce it in a new project, but it comes from loadConfig at the top of my ESLint config invoking the Vite config.

Reproduction

Can only reproduce in my project, tried but failed on fresh project

System Info
System:
    OS: macOS 27.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 86.97 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 26.13.1 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 12.2.3 - /opt/homebrew/bin/npm
    pnpm: 12.23.0 - /opt/homebrew/bin/pnpm
    bun: 1.4.5 - /Users/antoine/.bun/bin/bun
  Browsers:
    Safari: 27.2
Used Package Manager

pnpm

Validations
  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Linguagem predominante
TypeScript
Estrelas
1.2k
Forks
97
Merge médio
2d 19h
PRs com merge (30d)
14

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de vitejs/devtools

Todas as issues de vitejs/devtools

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.