# Error with --prod

**URL:** <https://forum.ionicframework.com/t/error-with-prod/108027>\
**Category:** ionic-v3\
**Created:** [October 7, 2017, 1:42pm UTC](https://forum.ionicframework.com/t/error-with-prod/108027 "2017-10-07T13:42:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nyffellare](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@nyffellare](https://forum.ionicframework.com/u/nyffellare)\
**Post date:** [October 7, 2017, 1:42pm UTC](https://forum.ionicframework.com/t/error-with-prod/108027/1 "2017-10-07T13:42:15Z")

</div>

Hello,

When i use ionic cordova build android --prod --release it gives a strange error. I tried to fix it but it always results in a broken app. Does anyone have an ideahow to solve this?  
Ionic cordova build android --realease works perfect btw.

Thanks in advance!

Greetings,  
Nyffellare

Here is the error:

```auto
PS D:\Personal_Files\Documenten\Ionic\ChecklistByBlackSuitDevelopers> ionic cordova build android --prod --release
[INFO] Running app-scripts build: --prod --platform android --target cordova

[15:35:02] build prod started ...
[15:35:02] clean started ...
[15:35:02] clean finished in 1 ms
[15:35:02] copy started ...
[15:35:02] ngc started ...
Error: Type AboutPage in D:/Personal_Files/Documenten/Ionic/ChecklistByBlackSuitDevelopers/src/pages/about/about.ts is part of the declarations of 2 modules: AppModule in D:/Personal_Files/Documenten/Ion
ic/ChecklistByBlackSuitDevelopers/src/app/app.module.ts and AboutPageModule in D:/Personal_Files/Documenten/Ionic/ChecklistByBlackSuitDevelopers/src/pages/about/about.module.ts! Please consider moving Ab
outPage in D:/Personal_Files/Documenten/Ionic/ChecklistByBlackSuitDevelopers/src/pages/about/about.ts to a higher module that imports AppModule in D:/Personal_Files/Documenten/Ionic/ChecklistByBlackSuitD
evelopers/src/app/app.module.ts and AboutPageModule in D:/Personal_Files/Documenten/Ionic/ChecklistByBlackSuitDevelopers/src/pages/about/about.module.ts. You can also create a new NgModule that exports a
nd includes AboutPage in D:/Personal_Files/Documenten/Ionic/ChecklistByBlackSuitDevelopers/src/pages/about/about.ts then import that NgModule in AppModule in D:/Personal_Files/Documenten/Ionic/ChecklistB
yBlackSuitDevelopers/src/app/app.module.ts and AboutPageModule in D:/Personal_Files/Documenten/Ionic/ChecklistByBlackSuitDevelopers/src/pages/about/about.module.ts.
    at Error (native)
    at syntaxError (D:\Personal_Files\Documenten\Ionic\ChecklistByBlackSuitDevelopers\node_modules\@angular\compiler\bundles\compiler.umd.js:1550:34)
    at CompileMetadataResolver._addTypeToModule (D:\Personal_Files\Documenten\Ionic\ChecklistByBlackSuitDevelopers\node_modules\@angular\compiler\bundles\compiler.umd.js:14655:31)
    at D:\Personal_Files\Documenten\Ionic\ChecklistByBlackSuitDevelopers\node_modules\@angular\compiler\bundles\compiler.umd.js:14543:27
    at Array.forEach (native)
    at CompileMetadataResolver.getNgModuleMetadata (D:\Personal_Files\Documenten\Ionic\ChecklistByBlackSuitDevelopers\node_modules\@angular\compiler\bundles\compiler.umd.js:14534:54)
    at addNgModule (D:\Personal_Files\Documenten\Ionic\ChecklistByBlackSuitDevelopers\node_modules\@angular\compiler\bundles\compiler.umd.js:23050:58)
    at D:\Personal_Files\Documenten\Ionic\ChecklistByBlackSuitDevelopers\node_modules\@angular\compiler\bundles\compiler.umd.js:23061:14
    at Array.forEach (native)
    at _createNgModules (D:\Personal_Files\Documenten\Ionic\ChecklistByBlackSuitDevelopers\node_modules\@angular\compiler\bundles\compiler.umd.js:23060:26)

```

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [October 7, 2017, 7:52pm UTC](https://forum.ionicframework.com/t/error-with-prod/108027/2 "2017-10-07T19:52:09Z")

</div>

Not strange at all I think

```
  Type AboutPage in ... is part of the declarations of 2 modules...
  app.module.ts
 about.module.ts

```

You are using lazy loading? Delete the entry in app.module.ts about AboutPageModule  
You are not using lazy loading? Delete about.module.ts

P.S.: Using `--prod` option when building in comparison to “just” running `ionic server` will perform extra checks
