Sometimes, we want to fix module has no exported member error with TypeScript.
In this article, we’ll look at how to fix module has no exported member error with TypeScript.
How to fix module has no exported member error with TypeScript?
To fix module has no exported member error with TypeScript, we make sure we’re importing things that are exported.
For instance, we write
import { SigninComponent } from "./auth/components/signin.component";
to import SigninComponent
from ./auth/components/signin.component.ts
.
If it’s a default export then we write
import SigninComponent from "./auth/components/signin.component";
We should also make sure the path we’re importing is right.
Conclusion
To fix module has no exported member error with TypeScript, we make sure we’re importing things that are exported.