Angular / angular material 13 + jsonforms latest not working

Hi, need to use jsonforms with an already existing angular / angular material 13 project (can’t downgrade). As soon as I add the angular material renderers the project breaks (simple sample project setup in stackblitz).

    "@angular/animations": "^13.2.5",
    "@angular/cdk": "^13.2.5",
    "@angular/common": "^13.2.5",
    "@angular/compiler": "^13.2.5",
    "@angular/core": "^13.2.5",
    "@angular/flex-layout": "^9.0.0-beta || ^10.0.0-beta || ^11.0.0-beta",
    "@angular/forms": "^13.2.5",
    "@angular/material": "^13.2.5",
    "@angular/platform-browser": "^13.2.5",
    "@angular/platform-browser-dynamic": "^13.2.5",
    "@angular/router": "^13.2.5",
    "@jsonforms/angular": "^3.0.0-beta.1",
    "@jsonforms/angular-material": "^3.0.0-beta.1",
    "@jsonforms/core": "^3.0.0-beta.1",
    "ajv": "^8.6.1",
    "core-js": "^2.5.3",
    "rxjs": "^7.5.4",
    "tslib": "^2.3.1",
    "zone.js": "^0.11.5"

error message:

Error in turbo_modules/@jsonforms/angular-material@3.0.0-beta.1/lib/esm/module.d.ts (1:22)
Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

This likely means that the dependency (@jsonforms/angular-material) which declares JsonFormsAngularMaterialModule has not been processed correctly by ngcc.

What changes have to be made in order to get latest jsonforms with angular / angular material 13 to work correctly?

Thanks for any help.

Hi @odn,

I’m not sure, this needs to be investigated. The current 3.0.0-beta.1 is built against Angular 12, so maybe that is the issue? However in practice Angular is usually backwards compatible.

Are you able to custom build JSON Forms, update it to Angular 13, consume it in your project and see whether that fixes the problem?

You could also check whether our ESM build is faulty by deleting it from your node_modules and modifying the package.json to remove the ESM entry. Then you would consume the commonjs build.

Did you try it in a “normal” project, outside of Stackblitz?