error TS2614: Module '"./slugify.js"' has no exported member 'slugify'. Did you mean to use 'import slugify from "./slugify.js"' instead? is reported when the braces of a named import ask for a name that the module exports only as its default. TS2613 is the opposite mistake: import formatPrice from "./format.js" for a module with named exports and no default.
Both messages already contain the fix. They are common when a module changes from export default to named exports (or back), and when code moves between CommonJS habits and ES modules.
At a glance
| Code | TS2614 |
|---|---|
| Message | Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead? |
Also on this page: TS2613 | Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead? |
| TypeScript's category | error |
| Listed under | Modules and imports |
| Turned on by | No option: every checked file reports it |
| In .js files | Reported when the file is checked: checkJs in jsconfig.json, or // @ts-check at the top of the file |
The messages are TypeScript's own text from its diagnostic messages file (Apache-2.0); {0} and {1} are filled in by tsc for each error.
What it looks like
import { slugify } from "./slugify.js";error TS2614: Module '"./slugify.js"' has no exported member 'slugify'. Did you mean to use 'import slugify from "./slugify.js"' instead?
import formatPrice from "./format.js";error TS2613: Module '"/project/format"' has no default export. Did you mean to use 'import { formatPrice } from "/project/format"' instead?
export const url = `/products/${slugify("Cotton tee")}?p=${formatPrice(1999)}`;jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"target": "es2022",
"module": "nodenext",
"types": []
},
"include": ["*.js"]
} What causes it
- The module uses
export default function slugifyand the import saysimport { slugify }(TS2614). - The module uses
export function formatPriceand the import saysimport formatPrice(TS2613).
How to fix it
Write the import the way the module exports
Default export: import slugify from "./slugify.js" (any local name works). Named export: import { formatPrice } from "./format.js".
import slugify from "./slugify.js";
import { formatPrice } from "./format.js";
export const url = `/products/${slugify("Cotton tee")}?p=${formatPrice(1999)}`;jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"target": "es2022",
"module": "nodenext",
"types": []
},
"include": ["*.js"]
} Gotchas
- The TS2613 message names the module by its resolved path without the extension (tsc prints the full path; on this site examples live at
/project), so its suggested import is not a path to copy. Keep your original specifier. - Importing a CommonJS package's default export is a different question, governed by
esModuleInterop; see TS1259.
Sources
- export · MDN Web Docs
- Modules Reference · TypeScript handbook
- diagnosticMessages.json (TypeScript 5.9.3) · TypeScript on GitHub
Last reviewed 20 October 2026.