Upgrade from 3.0.0-alpha.3 to 3.0.0 causing module not found errors

Hi All,

i’m trying to upgrade to 3.0.0 to make use of the new additionalErrors functionality. I’m upgrading from 3.0.0-alpha.3. When I attempt to serve my application I get multiple similar errors about not being able to resolve modules from @jsonforms/material-renderers/lib/complex. For example I have a custom renderer with the following import:

import { DeleteDialog } from '@jsonforms/material-renderers/lib/complex/DeleteDialog';

And when I try to run my application I get the following error:
ERROR in ./src/jsonforms/complex/CustomArrayControlRenderer.tsx 7:0-86
Module not found: Error: Can’t resolve ‘@jsonforms/material-renderers/lib/complex/DeleteDialog’ in ‘/Users/sukjmx/dev/code/solution-factory-configuration-ui/src/jsonforms/complex’
resolve ‘@jsonforms/material-renderers/lib/complex/DeleteDialog’ in ‘/Users/sukjmx/dev/code/solution-factory-configuration-ui/src/jsonforms/complex’

I’m using the following versions of jsonforms libraries:
@jsonforms/core”: “^3.0.0”,
@jsonforms/material-renderers”: “^3.0.0”,
@jsonforms/react”: “^3.0.0”,

I’m also using webpack to serve up my application with the following versions:
“webpack”: “^5.51.1”,
“webpack-cli”: “^4.8.0”,
“webpack-dev-server”: “^4.11.1”,
“webpack-merge”: “^5.10.0”

I can provide my webpack development config if required.

Hi @james-morris,

We no longer publish each separate transpiled file but only the combined bundle. So all imports need to be performed against @jsonforms/material-renderers. The separately published @jsonforms/material-renderers/lib/xyz are no longer available.

We usually export all internally used utils and components. Let us know in case we missed one.

Hi @sdirix ,

Thanks that has worked for almost all of my imports! The remaining three i’m struggling to import are: materialCategorizationStepperTester, MaterialCategorizationStepperLayout and ValidationIcon

It seems like we missed to export the stepper renderer, see here. As a workaround you can copy it to your code base.

The validation icon is exported, however it’s a default export, so it’s lost in the mist. We should name export it, then it would work again. For now you can also copy it to your code base.

1 Like