tsc TS1192: Module 'x' has no default export in CI
TS1192 means you wrote import X from 'mod' but the module declares only named exports and no default. tsc rejects the default binding because there is nothing to bind it to.
What this error means
tsc fails with "error TS1192: Module '\"x\"' has no default export." at a default import line.
src/app.ts:1:8 - error TS1192: Module '"./logger"' has no default export.
1 import logger from './logger';
~~~~~~Common causes
The module exports named symbols only
The target has export const/export function but no export default, so a default import binds to nothing.
A default import used where a namespace import is needed
Some modules expose their API only as named exports; importing a default conflicts with that shape.
How to fix it
Use a named or namespace import
- Check what the module actually exports.
- Import the named symbol, or use a namespace import for the whole module.
- Re-run tsc to confirm the import resolves.
import { logger } from './logger';
// or: import * as logger from './logger';Add a default export if the module should provide one
If a default is the intended API, declare it in the source module.
// logger.ts
export default createLogger();How to prevent it
- Match import style to the module export shape.
- Decide named-vs-default export conventions per package and keep them.
- Let the editor autocomplete the correct import form.