TypeScript check fails: missing type definitions #36

Closed
opened 2026-03-11 09:58:06 +00:00 by ghost · 0 comments
ghost commented 2026-03-11 09:58:06 +00:00 (Migrated from github.com)

Description

Running npm run tsc fails with the following error:

error TS2688: Cannot find type definition file for 'vite-plugin-svgr/client'.
error TS2688: Cannot find type definition file for 'vite/client'.

Root Cause

The tsconfig.json references type definitions that are not installed in devDependencies:

  • vite/client
  • vite-plugin-svgr/client

These are listed in compilerOptions.types but the packages @types/vite and vite-plugin-svgr are not in package.json.

Reproduction

cd headlamp-polaris-plugin
npm install
npm run tsc

Expected

TypeScript check should pass (as documented in CLAUDE.md: "All tests and tsc must pass before committing").

Suggested Fix

Either:

  1. Add missing type packages to devDependencies, OR
  2. Remove the unused type references from tsconfig.json

Tests: pass (77/77)
Lint: passes
TypeScript: FAILS

## Description Running `npm run tsc` fails with the following error: ``` error TS2688: Cannot find type definition file for 'vite-plugin-svgr/client'. error TS2688: Cannot find type definition file for 'vite/client'. ``` ## Root Cause The `tsconfig.json` references type definitions that are not installed in devDependencies: - `vite/client` - `vite-plugin-svgr/client` These are listed in `compilerOptions.types` but the packages `@types/vite` and `vite-plugin-svgr` are not in `package.json`. ## Reproduction ```bash cd headlamp-polaris-plugin npm install npm run tsc ``` ## Expected TypeScript check should pass (as documented in CLAUDE.md: "All tests and tsc must pass before committing"). ## Suggested Fix Either: 1. Add missing type packages to devDependencies, OR 2. Remove the unused type references from tsconfig.json Tests: pass (77/77) Lint: passes TypeScript: FAILS
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: privilegedescalation/headlamp-polaris-plugin#36