ProjectStack
typescript

TS2305: Module 'X' has no exported member 'Y'

You're importing a named export that doesn't exist in that module. The module either doesn't export anything by that name, the name is misspelled, or the export was removed or renamed in a newer version of the package.

Common causes

  • A typo in the export name you're importing
  • The export was renamed in a newer version of the library
  • You're importing a named export from a module that only has a default export
  • The import is from the wrong file or sub-path of the package

How to fix it

  1. Check the module's documentation or source for the correct export name
  2. Use IDE autocomplete to see what's available: type import { } from 'module' and use autocomplete
  3. If the library renamed the export, update to the new name and check the migration guide
  4. For default exports, use import MyModule from 'module' instead of import { MyModule }

Example

import { useState, useEffekt } from 'react'; // error TS2305: Module '"react"' has no exported member 'useEffekt'.

Typo in the import — useEffekt instead of useEffect

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.