[SOLVED] Error CLI generate page

Hi there!

I try to generate page via CLi function :
ionic g page Home

But when i launch the app, i get this error :
Module ‘“C:/Users/T4GAD4/Documents/IONIC/CellarWine/src/pages/home/homr”’ has no exported member ‘Home’.

I already put this in app.components
import { Home} from '../pages/home/home'; this.pages = [ { title: 'Home', component: Home} ];
and module :
import { Home} from '../pages/home/home';

Can someone help me ? :wink:

Your error message has ‘homr’ instead of ‘home’ in it. I would also make sure your component is really called “Home” and not (for example) “HomePage”.

1 Like

sorry, bug in my copy, my error is really :
Module ‘“C:/Users/T4GAD4/Documents/IONIC/CellarWine/src/pages/home/home”’ has no exported member

Logically, my component has the right name, where can i check this ?

when generating a new page, it will automatically name the class like so HomePage

you will also have to add the page to the app.module.ts file by importing the page, then adding it to the declarations and the entryComponents as the CLI does not do this

1 Like


I don’t realized that CLI generate a page Home like HomePage…