Common causes
- The module uses only named exports but you're using a default import
- Confusing a CommonJS module (module.exports = ...) with an ES module default export
- The library changed from a default export to named exports in a newer version
- Missing export default in your own module file
How to fix it
- Use named imports instead: import { SpecificThing } from 'module'
- Check the module's documentation for the correct import syntax
- If it's your own module, add export default to the file
- Import the entire module as a namespace: import * as MyModule from 'module'
Example
import lodash from 'lodash';
// error TS1192: Module '"lodash"' has no default export.Importing lodash with default syntax — lodash uses named exports, not a default export
Browse more errors
The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.
