UI Import Audit (shadcn/ui)
When to use
- •You add a new shadcn component and imports start failing
- •You created placeholder
src/components/ui/*.tsxand want to ensure coverage - •You see runtime errors due to missing exports (e.g., Tooltip exports)
Outcome
- •Every
@/components/ui/<name>import points to an existing file - •Core exports in primitives match what the app imports
Procedure
- •
Run the helper script (fast):
- •
For each missing file:
- •Create
src/components/ui/<name>.tsx - •Export the same symbols the importing files expect
- •Prefer the canonical shadcn/Radix implementation over placeholders
- •Create
- •
For export mismatches:
- •Search for
from '@/components/ui/<name>'insrc/** - •Ensure the module exports those symbols
- •Search for
- •
Verify:
- •
npm run lint - •
npm run build
- •