Doctor · dead code

DOC0003Declare an imported dependency

A scanned import, re-export, or literal dynamic import names an undeclared package.
vite-doctor/coredead-codewarnNo fix
workspace/dead-code/unlisted-dependencysrc/core/internal/workspace-graph.ts

Why it happens

Doctor compares package references with dependencies, devDependencies, peerDependencies, and optionalDependencies in discovered package.json files. Recognized Node built-ins, hash-prefixed imports, and known tooling exclusions do not require a dependency declaration.

Fix

Add the package to the appropriate dependency field in package.json, or remove the unused import. Check the owning package when running in a workspace, and verify that custom aliases are represented correctly before treating them as external packages.

Verify the fix

Rerun the workspace analysis after editing:

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