Milind Kali
Milind Kali

Reputation: 1

Angular 6 upgrade run time issue for optimized build

I have upgraded my current project from angular 4 to version 6. I followed the steps mentioned in this URL: https://update.angular.io/

I corrected the import definitions for RxJs classes and operators according to version 6+, used pipe operators to combine multiple operators and resolved the name of operators that were changed in RxJs version 6.

I am not facing any issue when compiling the build for development but observing issue while running the application with optimized build **ng --prod**.

Here is my current package.json file.

    "dependencies": {
      ...
      "primeng": "4.0.3",
      "rxjs": "^6.3.2",
      "rxjs-compat": "^6.3.2",
      "tixif-ngx-busy": "0.0.8",
      "zone.js": "^0.8.26"
    }

and here is the error in console.

https://i.sstatic.net/RY565.png

Upvotes: 0

Views: 57

Answers (1)

Mohd. Anas
Mohd. Anas

Reputation: 11

Based on our troubleshooting related to this upgrade, We found out that, we were using an angular module called ngBusy that was causing the build to fail.

To be specific, here is how I troubleshooted this issue.

  1. Narrowed down on files that might be causing the prod build to fail- I did this by starting with one module and testing if the build was fine or not and then added other modules one by one.

  2. Based on step 1, I found out that if I remove all the occurrences of ngBusy, my angular build was working perfect, in both development and production environments.

  3. Based on this, we upgraded the ngBusy module to version 6, which finally resolved the issue.

This was a very small issue but it took us, three days to dig it up. Hope it helps!

Upvotes: 1

Related Questions