Skip to content

Vitest 5.1.0 declarations import ESTree from Vite, breaking type-checking with Vite 7 #11942

Open

Description

@spike-rabbit

Describe the bug

After upgrading from Vitest 5.0.5 to 5.1.0 while retaining Vite 7.3.6, TypeScript compilation fails with:

TS2305: Module '"vite"' has no exported member 'ESTree'.

Reproduction

https://github.com/spike-rabbit/vitest-vite7-estree-repro

git clone https://github.com/spike-rabbit/vitest-vite7-estree-repro.git
cd vitest-vite7-estree-repro
npm ci
npm run typecheck:tests

The final command fails with:

node_modules/vitest/dist/chunks/plugin.d.LRFSN46m.d.ts(1,166):
error TS2305: Module '"vite"' has no exported member 'ESTree'.

System Info

System:
    OS: macOS 27.2
    CPU: (18) arm64 Apple M5 Pro
    Memory: 1.81 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.21.0 - /Users/maxi/.local/share/mise/installs/node/24.21.0/bin/node
    Yarn: 1.22.22 - /Users/maxi/.local/share/mise/installs/node/24.21.0/bin/yarn
    npm: 11.19.0 - /Users/maxi/.local/share/mise/installs/node/24.21.0/bin/npm
  Browsers:
    Edge: 157.0.4341.46
    Firefox: 159.0
    Safari: 27.2
  npmPackages:
    vite: 7.3.6 => 7.3.6
    vitest: 5.1.0 => 5.1.0

Used Package Manager

npm

Validations

Activity

  1. added theissue type on Nov 11, 2026
  2. Ksander215 commented on Nov 12, 2026

    @Ksander215

    Hi Maximilian,

    I came across your Vitest issue (#11942) and the repro repo. Good report.

    I’m working on an open-source project where we try AI coding assistants on small, real engineering problems. I’m looking for people who reported a problem they’d actually like fixed, and I wanted to ask whether you’d be open to letting an assistant take a run at yours.

    The idea is simple: you describe what you expect and what “done” means in your own words. The assistant gets those requirements and a clean checkout of Vitest, and nothing from this issue beyond what you choose to tell me. If it gets stuck, I pass the question back to you.

    Afterwards, you decide whether the result is useful. You can reject it completely, keep it for yourself, or do whatever you want with it. There’s no commitment to open a PR or contribute anything upstream.

    If that sounds interesting, I can send you the short set of questions I’d use to define the task. If not, no worries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions