# Error when generating production build

**URL:** <https://forum.ionicframework.com/t/error-when-generating-production-build/134107>\
**Category:** Appflow\
**Created:** [July 1, 2018, 3:46pm UTC](https://forum.ionicframework.com/t/error-when-generating-production-build/134107 "2018-07-01T15:46:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cemansilla](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@cemansilla](https://forum.ionicframework.com/u/cemansilla)\
**Post date:** [July 1, 2018, 3:46pm UTC](https://forum.ionicframework.com/t/error-when-generating-production-build/134107/1 "2018-07-01T15:46:00Z")

</div>

I’m stuck with an error that I can not solve. Tell me if you need me to show you another file or configuration, I’ll be pending since I need to resolve it ASAP.

The error started when trying to create the build with _–prod_, I was fixing, updating dependencias and currently when executing `ionic cordova build android --prod --verbose` I get:

> typescript error  
> ‘ion-icon’ is not a known element: 1. If ‘ion-icon’ is an Angular component, then verify that it is part of  
> this module. 2. If ‘ion-icon’ is a Web Component then add ‘CUSTOM\_ELEMENTS\_SCHEMA’ to the  
> ‘@NgModule.schemas’ of this component to suppress this message. ("\> \<button ion-button icon-only  
> color=“white” (click)=“openSearchModal()”\> [ERROR -\>]   
> ")

> ‘ion-buttons’ is not a known element: 1. If ‘ion-buttons’ is an Angular component, then verify that it is  
> part of this module. 2. If ‘ion-buttons’ is a Web Component then add ‘CUSTOM\_ELEMENTS\_SCHEMA’ to the  
> ‘@NgModule.schemas’ of this component to suppress this message. (" [ERROR -\>] \<button ion-button icon-only color=“white”  
> (click)=“openSearchModal()”\> ")

> ‘ion-col’ is not a known element: 1. If ‘ion-col’ is an Angular component, then verify that it is part of  
> this module. 2. If ‘ion-col’ is a Web Component then add ‘CUSTOM\_ELEMENTS\_SCHEMA’ to the ‘@NgModule.schemas’  
> of this component to suppress this message. (" [ERROR  
> -\>] \<button ion-button icon-only color=“white” (click)=“ope”)

> Error: The Angular AoT build failed. See the issues above  
> Error: The Angular AoT build failed. See the issues above  
> at C:\Users\ceman\Desktop\idem-app-updated-master\node\_modules@ionic\app-scripts\dist\aot\aot-compiler.js:237:55  
> at step (C:\Users\ceman\Desktop\idem-app-updated-master\node\_modules@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)  
> at Object.next (C:\Users\ceman\Desktop\idem-app-updated-master\node\_modules@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)  
> at fulfilled (C:\Users\ceman\Desktop\idem-app-updated-master\node\_modules@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)  
> [ERROR] Command not found: ionic-app-scripts  
> ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms  
> ionic:cli-framework:utils:process onBeforeExit handler: running 1 queued functions +0ms  
> ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 127) +0ms

These are my files, tell me if you need to see another:

**app.module.ts:** [app.module.ts - Pastebin.com](https://pastebin.com/TXQ4tDFM)

**package.json:** [package.json - Pastebin.com](https://pastebin.com/kAK5eK5Z)

This is my configuration according to `ionic info`:

Ionic:

```
ionic (Ionic CLI) : 4.0.0-rc.9 (C:\Users\ceman\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.10

```

Cordova:

```
cordova (Cordova CLI) : not installed
Cordova Platforms : android 7.1.0

```

System:

```
Android SDK Tools : 26.1.1
NodeJS : v6.14.3 (P:\nodejs\node.exe)
npm : 6.1.0
OS : Windows 10

```

Environment:

```
ANDROID_HOME : P:\Android\sdk

```

I add an extra data, I had updated to Node 8 to see if this corrected something and nothing, I returned to version 6.

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![anna\_liebt](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@anna\_liebt](https://forum.ionicframework.com/u/anna_liebt)\
**Post date:** [July 1, 2018, 8:07pm UTC](https://forum.ionicframework.com/t/error-when-generating-production-build/134107/2 "2018-07-01T20:07:09Z")

</div>

Hello,  
try: Search for ion-icon and take a look if theer is any typo before them in html.

Best regards, anna-liebt

---

<div class="post-metadata">

**Author:** ![cemansilla](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@cemansilla](https://forum.ionicframework.com/u/cemansilla)\
**Post date:** [July 10, 2018, 12:18pm UTC](https://forum.ionicframework.com/t/error-when-generating-production-build/134107/3 "2018-07-10T12:18:07Z")

</div>

I need to import IonicModule in my module.ts

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:30pm UTC](https://forum.ionicframework.com/t/error-when-generating-production-build/134107/4 "2021-07-19T21:30:38Z")

</div>

Closed on July 19, 2021, 9:30pm UTC


