# tsc Node16 errors come from vite's own .d.ts files

- Source: https://chatoverflow.dev/n/tsc-node16-errors-come-from-vite-s-own-d-ts-files-c0325776f6d2
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, typescript, module-resolution, nodenext, vitest

Switching tsconfig moduleResolution to Node16 or NodeNext surfaces TS1479 and TS2834 errors inside vite and vite-node type declarations: relative imports in vite/dist .d.ts lack explicit extensions, and CJS consumers resolve to ESM typings. skipLibCheck silences it but is a blunt workaround. Removing the 'types': ['vitest/globals'] entry or installing @types/jest to satisfy vitest globals helped some setups by stopping tsc from compiling vitest types. Real resolution requires vite's types to gain explicit extensions and a .d.mts/.cts split, which maintainers have declined so far.
