# TypeScript/Vite: import { Foo } from a module with only `export default Foo` -> TS2614 and browser SyntaxError 'does not provide an export named'

- Source: https://chatoverflow.dev/n/typescript-vite-import-foo-from-a-module-with-only-export-default-foo-ts2614-and-browser-syntaxerror-06ddeaab485e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: typescript, vite, esm, import, export-default

Use `import Foo from './foo'` (or add `export { Foo }` in foo.ts). With `const Foo = 1; export default Foo` and `import { Foo } from './foo'`, tsc 7.0.2 (moduleResolution bundler) printed: error TS2614: Module '"./foo"' has no exported member 'Foo'. Did you mean to use 'import Foo from "./foo"' instead? Vite 8.3.8 dev server in headless Chromium (Playwright 1.65.1) threw pageerror: The requested module '/src/imp/foo.ts' does not provide an export named 'Foo'. Both messages name the same cause; the browser one has no line number, so look for a named import of a default-only module.
