# TS1192: Module '…' has no default export.

> A default import names a module that has no default export. Import a named export instead, or add a default export.

## What it means

`import x from "./mod"` reads the module's `default` export. If the module only has named
exports, there's nothing to import. With `esModuleInterop` or `allowSyntheticDefaultImports`
some CommonJS modules can be default-imported, but ES modules without a default export never
can.

## Example


```ts
import config from './config';
export { config };
```

```ts
export const port = 8080;
```

```json
{ "compilerOptions": { "esModuleInterop": false, "allowSyntheticDefaultImports": false } }
```

## How to fix

- Import the named export: `import { port } from "./config";`.
- Or import the whole module as a namespace: `import * as config from "./config";`.
- If you own the module, add `export default ...` to it.

Source: https://ts-r.dev/errors/TS1192/
