@grapecity/wijmo throwing run time error after upgrading my Angular project from 8 to 9

352 views Asked by At

Recently iam trying to update my angular project from 8 to 9. While updating i also updated wijmo from wijmo/wijmo to @grapecity/wijmo package as it supports IVY.

But after the completing the upgradation, i can able to compile the application but i am getting the following error at run time

global-error-handler.service.ts:43 Error: Uncaught (in promise): TypeError: (0 , t[n]) is not a function
TypeError: (0 , t[n]) is not a function
    at backend.js:61
    at Reflect.<anonymous> (backend.js:61)
    at push../node_modules/@grapecity/wijmo.angular2.grid.detail/__ivy_ngcc__/index.js.__decorate (index.js:28)
    at index.js:53
    at Object../node_modules/@grapecity/wijmo.angular2.grid.detail/__ivy_ngcc__/index.js (index.js:53)
    at __webpack_require__ (bootstrap:84)
1

There are 1 answers

0
Banzor On

I'd like to get some more info about this error. The quick thing to check is property initialization order. In Ivy, the properties are interpreted as they are specified in markup (previously wijmo controlled how they were interpreted). So you can break components by setting certain properties before others.

For example, if I tried to set the selectedIndex on a combobox BEFORE I set the data source, then the app would break at runtime because there are no items in the list to select yet.

More info here: https://www.grapecity.com/wijmo/docs/GettingStarted/Angular-Components#property-initialization-order-in-angular-9-ivy-and-higher

The next thing to check is component decorators (if you are inheriting our components). There are some breaking changes in decorators in Ivy.

For example, you might need to add {descendants: true} to ContentChildren queries.

Or you might need to add an @Injectable decorator to your class.

You can read more about breaking changes in Ivy and how to fix them here: https://angular.io/guide/ivy-compatibility-examples

But please feel free to contact us to work directly: [email protected]