Doctor · dead code

DOC0004Resolve a local source import

A local source import has no matching file in Doctor's workspace graph.
vite-doctor/coredead-codeerrorNo fix
workspace/dead-code/unresolved-importsrc/core/internal/workspace-graph.ts

Why it happens

Doctor could not match a local import, re-export, or literal dynamic import to a scanned source file. Recognized asset and generated imports are excluded. This diagnosis reflects Doctor's source inventory and resolution rules; custom host resolution can require additional evidence.

Fix

Correct the import path or add the missing source file. If the host resolves the import successfully, check source exclusions, generated files, and aliases before changing working application code. Run Doctor with the project's Plugin Surface when host inventory is needed.

Verify the fix

Rerun the workspace analysis after editing:

pnpm vite-doctor . --analyses dead-code
  • workspace/dead-code/unresolved-import
Copyright © 2026