# Ionic 3 error after update

**URL:** <https://forum.ionicframework.com/t/ionic-3-error-after-update/89979>\
**Category:** ionic-v3\
**Created:** [May 12, 2017, 8:10am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979 "2017-05-12T08:10:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 8:10am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/1 "2017-05-12T08:10:12Z")

</div>

**system info is:**  
global packages:

```
@ionic/cli-utils : 1.0.0
Cordova CLI : 6.5.0
Ionic CLI : 3.0.0

```

local packages:

```
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.0.0
@ionic/cli-plugin-ionic-angular : 1.0.0
Ionic Framework : ionic-angular 3.2.0

```

System:

```
Node : v6.10.3
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed

```

**command: ionic cordova build android --prod**

Error: ./src/pages/contact/BusinessContactsUpdate.ts  
Module build failed: TypeError: Cannot read property ‘content’ of undefined  
at Object.optimizationLoader (F:\ionic2\iCarApp201705081419\_RC2\node\_modules\_@ionic\_app-scripts@1.3.7@@ionic\app-scripts\dist\webpack\optimization-loader-impl.js:14:24)  
at Object.loader (F:\ionic2\iCarApp201705081419\_RC2\node\_modules\_@ionic\_app-scripts@1.3.7@@ionic\app-scripts\dist\webpack\optimization-loader.js:5:32)  
@ ./src/app/app.module.js 61:0-85  
@ ./src/app/app.module.ngfactory.js  
@ ./src/app/main.ts

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/6/5/65a4e8439e1245a707953e5f24d99615e5eb31e0.png)

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 8:46am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/2 "2017-05-12T08:46:14Z")

</div>

help me !!! pls…

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [May 12, 2017, 8:48am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/3 "2017-05-12T08:48:40Z")

</div>

Please show BusinessContactsUpdate.ts and BusinessContactsUpdate.html full

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 9:01am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/4 "2017-05-12T09:01:45Z")

</div>

![image](https://global.discourse-cdn.com/ionicframework/original/3X/0/6/06f11f076773466c5644fea3cf8684b4f2a87d20.png)

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 9:33am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/5 "2017-05-12T09:33:14Z")

</div>

hi when i use :  
ionic cordova build android,success  
but ionic cordova build android --prod ,always show error like up…

---

<div class="post-metadata">

**Author:** ![pujawardani](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@pujawardani](https://forum.ionicframework.com/u/pujawardani)\
**Post date:** [May 12, 2017, 9:35am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/6 "2017-05-12T09:35:28Z")

</div>

have you try to run the app using `ionic serve` first?  
did you get the same error?

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 9:51am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/7 "2017-05-12T09:51:07Z")

</div>

yes,i have try ionic serve,work for me success!!! but have a error like follow

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/c/e/cef66e4f679017fa72f1323e6b47bea337fbb521.png)

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 10:06am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/8 "2017-05-12T10:06:12Z")

</div>

help,help this error made me crazy…

---

<div class="post-metadata">

**Author:** ![pujawardani](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@pujawardani](https://forum.ionicframework.com/u/pujawardani)\
**Post date:** [May 12, 2017, 10:30am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/9 "2017-05-12T10:30:16Z")

</div>

error message you get is for cordova.  
if you upgrade your ionic native to v.3.x.x you will never get that error…  
if you still using ionic native v.2.x.x it’s normal for you to get that error message…

for your case now, try to run `ionic run android` command… and deploy your app to compatible device,  
if you still get build problem i guess it’s something to do with the plugin you are using now

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 10:33am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/10 "2017-05-12T10:33:32Z")

</div>

oh~~ please see above,ionic native is v3,and when i use

ionic cordova build android everything is ok

ionic cordova build android --prod error’s like the pic up up up…

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 11:03am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/11 "2017-05-12T11:03:56Z")

</div>

anyone can help me? realy realy need help,thx!!!

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [May 12, 2017, 11:03am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/12 "2017-05-12T11:03:58Z")

</div>

You should really post your code as text and not as screenshots. Right now nobody can use Ctrl+F on your code, nobody can google your error message. If you want help, post your code and the error message and format it correctly so we can read it.

---

<div class="post-metadata">

**Author:** ![pujawardani](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@pujawardani](https://forum.ionicframework.com/u/pujawardani)\
**Post date:** [May 12, 2017, 11:06am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/13 "2017-05-12T11:06:05Z")

</div>

i’m sorry @sky_zt hehehe… i forgot the root cause…  
me and my boss actually get the same error like this 2 weeks ago…  
i suggest you to read this [https://github.com/driftyco/ionic-native/releases](https://github.com/driftyco/ionic-native/releases)  
on v.3.7.0 they say build error is fixed… i wish it will help your problem

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 11:24am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/14 "2017-05-12T11:24:58Z")

</div>

**sorry**

**ionic cordova build android --prod**

> Error: ./src/pages/contact/BusinessContactsUpdate.ts  
> Module build failed: TypeError: Cannot read property ‘content’ of undefined  
> at Object.optimizationLoader (F:\ionic2\iCarApp201705081419\_RC2\node\_modules\_@ionic\_app-scripts@1.3.7@@ionic\app-scripts\dist\webpack\optimization-loader-impl.js:14:24)  
> at Object.loader (F:\ionic2\iCarApp201705081419\_RC2\node\_modules\_@ionic\_app-scripts@1.3.7@@ionic\app-scripts\dist\webpack\optimization-loader.js:5:32)  
> @ ./src/app/app.module.js 61:0-85  
> @ ./src/app/app.module.ngfactory.js  
> @ ./src/app/main.ts

**system info**

```auto
global packages:
    @ionic/cli-utils : 1.0.0
    Cordova CLI : 6.5.0
    Ionic CLI : 3.0.0
local packages:
    @ionic/app-scripts : 1.3.7
    @ionic/cli-plugin-cordova : 1.0.0
    @ionic/cli-plugin-ionic-angular : 1.0.0
    Ionic Framework : ionic-angular 3.2.0
System:
    Node : v6.10.3
    OS : Windows 10
    Xcode : not installed
    ios-deploy : not installed
    ios-sim : not installed

```

**BusinessContactsUpdate.ts**

```auto

import { Component } from '@angular/core';

import { NavController,NavParams,ViewController } from 'ionic-angular';

@Component({
  selector: 'page-contact',
  templateUrl: 'businessContactsUpdate.html'
})

export class BusinessContactsUpdatePage {
  linkMan:string;
  clickNum:number=0;
  constructor(public navCtrl: NavController,private navParams:NavParams,private viewCtrl:ViewController) {
    this.linkMan = navParams.get('linkMan');
  }

  saveLinkMan(){
    let data = { linkMan:this.linkMan };
    this.viewCtrl.dismiss(data);
    //this.navCtrl.pop(this.linkMan);
  }
    goback(){
        if(this.clickNum==0){
            this.clickNum=1;
            this.navCtrl.pop();
        }
        
    }
}

```

**BusinessContactsUpdate.html**

```auto
< ion-header no-shadow>
    < ion-navbar hideBackButton="true">
        < button ion-button menuToggle (click)="goback()">
            < ion-icon ios="ios-arrow-back" md="md-arrow-back"></ion-icon>
        < /button>
        < ion-title>modify</ion-title>
        < ion-buttons right id="mg-mainRange-update" tappable (click)="saveLinkMan()">
            < button ion-button icon-only menuToggle>
        < ion-icon name="save">save</ion-icon>
      < /button>
        < /ion-buttons>
    < /ion-navbar>
< /ion-header>

< ion-content id="mg-store-correlation">
    < ion-list no-border-bottom class="mg-info-list">
        < ion-item>
            < ion-input type="text" placeholder="contact" [(ngModel)]="linkMan">{{linkMan}}</ion-input>
        < /ion-item>
    < /ion-list>
< /ion-content>

```

---

<div class="post-metadata">

**Author:** ![aditya\_1027](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aditya_1027/32/109341_2.png) [@aditya\_1027](https://forum.ionicframework.com/u/aditya_1027)\
**Post date:** [May 12, 2017, 11:31am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/15 "2017-05-12T11:31:57Z")

</div>

Check this link, if this can help you:

> [@Ionic serve failing in example projects after fresh install](https://forum.ionicframework.com/t/ionic-serve-failing-in-example-projects-after-fresh-install/70099):
>
> I’m currently trying to set up a basic ionic 2 project. I’ve had everything working fine in v1, but after moving to v2 and fixing some VCBuild-related issues by installing a Windows SDK, ionic serve fails after creating a new project via ionic start MyApp blank --v2. I get normal output from the script: [20:53:13] ionic-app-scripts 0.0.43 [20:53:13] watch started ... [20:53:13] build dev started ... [20:53:13] clean started ... [20:53:13] clean finished in 16 ms [20:53:13] copy started .…

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [May 12, 2017, 11:52am UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/16 "2017-05-12T11:52:30Z")

</div>

Please edit your post and use the `</>` button above the post input field to format your code or error message or wrap it in ````` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 12:08pm UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/17 "2017-05-12T12:08:35Z")

</div>

problem aways in!!!  
but when i user ionic2 ,main.js is too big but can’t compress ,so i update to ionic3…

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 12:26pm UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/18 "2017-05-12T12:26:03Z")

</div>

sorry ,sorry ,please help me,thx

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [May 12, 2017, 1:53pm UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/19 "2017-05-12T13:53:38Z")

</div>

Your code looks worse than before. I won’t invest the time trying to read that. Hope somebody else will. good luck.

---

<div class="post-metadata">

**Author:** ![sky\_zt](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sky_zt/32/109531_2.png) [@sky\_zt](https://forum.ionicframework.com/u/sky_zt)\
**Post date:** [May 12, 2017, 2:21pm UTC](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979/20 "2017-05-12T14:21:39Z")

</div>

so sorry !!! i have format my code now ,please help me,thx!!!

[Next page](https://forum.ionicframework.com/t/ionic-3-error-after-update/89979.md?page=2)
