Build Error in ionic

I have created an app using ionic v3
but trying to build the apk file CLI through an error

mysangham is my project name

I have used
ionic cordova run android to run the application in stimulator and it works fine

i used these command in CLI
ionic cordova run android --prod --release or ionic cordova build android --prod --release
it shows the following error

Running app-scripts build: --prod --platform android --target cordova
[15:57:12] build prod started …
[15:57:12] clean started …
[15:57:12] clean finished in 7 ms
[15:57:12] copy started …
[15:57:12] deeplinks started …
[15:57:12] deeplinks finished in 66 ms
[15:57:12] ngc started …
Error: Type ChapterPage in D:/Projects/ionic project/mySangham/android/src/pages
/chapter/chapter.ts is part of the declarations of 2 modules: AppModule in D:/Pr
ojects/ionic project/mySangham/android/src/app/app.module.ts and ChapterPageModu
le in D:/Projects/ionic project/mySangham/android/src/pages/chapter/chapter.modu
le.ts! Please consider moving ChapterPage in D:/Projects/ionic project/mySangham
/android/src/pages/chapter/chapter.ts to a higher module that imports AppModule
in D:/Projects/ionic project/mySangham/android/src/app/app.module.ts and Chapter
PageModule in D:/Projects/ionic project/mySangham/android/src/pages/chapter/chap
ter.module.ts. You can also create a new NgModule that exports and includes Chap
terPage in D:/Projects/ionic project/mySangham/android/src/pages/chapter/chapter
.ts then import that NgModule in AppModule in D:/Projects/ionic project/mySangha
m/android/src/app/app.module.ts and ChapterPageModule in D:/Projects/ionic proje
at Error (native)
at syntaxError (D:\Projects\ionic project\mySangham\android\node_modules@an
at CompileMetadataResolver._addTypeToModule (D:\Projects\ionic project\mySan
at D:\Projects\ionic project\mySangham\android\node_modules@angular\compile
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (D:\Projects\ionic project\my

at addNgModule (D:\Projects\ionic project\mySangham\android\node_modules\@an

at D:\Projects\ionic project\mySangham\android\node_modules@angular\compile
at Array.forEach (native)
at _createNgModules (D:\Projects\ionic project\mySangham\android\node_module
[15:57:14] copy finished in 2.15 s

Please help

There is you error. If you use lazy loading, remove the reference in AppModule, if you don’t use lazy module, remove chapter.module.ts

But if i remove this i will show an error in the normal run method "ionic cordova run android "


Running the cmd with --prod add extra checks which are not performed for example when you run ionic serve
This means that you face there the error too, it is just not shown