zebzhao / Angular-QueryBuilder

A modernized Angular 4+ query builder based on jquery QueryBuilder
MIT License
293 stars 222 forks source link

Angular 9 Compatibility #119

Open ChrisBates opened 4 years ago

ChrisBates commented 4 years ago

After updating to Angular 9, can no longer serve/build when importing QueryBuilderModule.

error NG1010: Value at position 11 in the NgModule.imports of SharedModule is not a reference: [object Object]

ChrisBates commented 4 years ago

I tested further by upgrading the Demo app to Angular 9 and it ran fine.

Through trial and error, I've identified that when allowSyntheticDefaultImports or esModuleInterop is enabled in tsconfig that it stops working.

Scratch that, still won't compile. I'm trying to find why it'll work in the Demo app, but not my app - but at this stage I have the configs the same and still no luck.

ChrisBates commented 4 years ago

Have submitted a PR: https://github.com/zebzhao/Angular-QueryBuilder/pull/123

For anyone having the same issues, I've published this to NPM until the author updates this: https://www.npmjs.com/package/angular9-query-builder

miticv commented 4 years ago

Thank you! I am using your npm for now until this is merged. It works great!

moxival commented 4 years ago

We have problems as well, trying to upgrade to NG9 but we have a problem with the QueryBuilder lib.

The project builds OK but there is the following runtime error: zone-evergreen.js:172 Uncaught Error: Uncaught (in promise): TypeError: Cannot read property 'type' of undefined TypeError: Cannot read property 'type' of undefined at Module.ɵɵNgOnChangesFeature (core.js:26829) at query-builder.component.js:1284 at Module../node_modules/angular2-query-builder/dist/angular2-query-builder/esm5/lib/query-builder/query-builder.component.js (query-builder.component.js:1313) at __webpack_require__ (bootstrap:84) at Module../node_modules/angular2-query-builder/dist/angular2-query-builder/esm5/public-api.js (public-api.js:1) at __webpack_require__ (bootstrap:84) at Module../node_modules/angular2-query-builder/dist/angular2-query-builder/esm5/angular2-query-builder.js (angular2-query-builder.js:1)

Also in PhpStorm when trying to import the QueryBuilderModule it is underlined and the IDE says that The Class QueryBuilderModule is not an Angular module.

azherf commented 4 years ago

We are facing the same issue after upgrading to Angular9.

Uncaught Error: Uncaught (in promise): TypeError: Cannot read property 'type' of undefined TypeError: Cannot read property 'type' of undefined at Module.ɵɵNgOnChangesFeature (core.js:26829)