Doctor · Architecture

DOC0001Break a circular dependency

Two or more source files belong to a cycle in the workspace dependency graph.
vite-doctor/corearchitecturewarnNo fix
workspace/dead-code/circular-dependencysrc/core/internal/workspace-graph.ts

Why it happens

Doctor found a strongly connected group of files through static imports or re-exports. A change to one cycle member can affect the others, and module initialization may depend on evaluation order. Dynamic imports do not create a cycle for this analysis.

Fix

Inspect the primary file and related cycle members. Move shared declarations into a module that does not import its consumers, or remove an unnecessary dependency. Rerun the graph analysis to confirm the cycle is gone.

Verify the fix

Rerun the workspace analysis after editing:

pnpm vite-doctor . --analyses graph
  • workspace/dead-code/circular-dependency
Copyright © 2026