Categories
TypeScript Answers

How to fix module has no exported member error with TypeScript?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *