TS80005: Import may be converted to a default import - in CI
TS80005 is a suggestion diagnostic recommending a namespace import be rewritten as a default import; some CI setups surface or fail on suggestions.
What this error means
tsc (often with --plugins or an editor running suggestions) reports TS80005 on a namespace import that could be a default import.
tsc
src/app.ts(1,8): message TS80005: This import may be converted to a default import.Common causes
How to fix it
Convert to a default import
- Rewrite the namespace import as a default import where interop allows it
ts
import React from 'react'Stop failing on suggestions
- Configure your lint/CI step not to treat suggestion diagnostics as errors if the namespace import is intentional
How to prevent it
- Adopt a consistent import style under esModuleInterop and decide whether suggestion diagnostics should gate CI.
Frequently asked questions
What causes "TS80005 default import hint"?
tsc (often with --plugins or an editor running suggestions) reports TS80005 on a namespace import that could be a default import.
How do I fix TS80005 default import hint?
Convert to a default import
Related guides
TS1259: Module can only be default-imported using esModuleInterop - in CIFix "error TS1259: Module ... can only be default-imported using the 'esModuleInterop' flag" when tsc runs in…
TS1192: Module has no default export - in CIFix "error TS1192: Module 'x' has no default export" when tsc runs in CI - a default import of a module that…
TS6133: Declared but its value is never read - in CIFix "error TS6133: 'x' is declared but its value is never read" under noUnusedLocals/noUnusedParameters when…