A theme's individual widgets and templates have no import path
Detect
- An import of one component from a theme's
libfolder in your code, such as@rjsf/mui/lib/SelectWidget/SelectWidget.js. - Your bundler fails to resolve that path, or Node throws
ERR_PACKAGE_PATH_NOT_EXPORTED.
Change
Read the component from the theme's Widgets or Templates export:
-import SelectWidget from '@rjsf/mui/lib/SelectWidget/SelectWidget.js';
+import { Widgets } from '@rjsf/mui';
+
+const { SelectWidget } = Widgets;
Inside a custom field, widget or template, use registry.widgets or registry.templates from the registry prop instead. For the other paths that went away, see imports from a package's lib folder no longer resolve.
Verify
- No code imports from a theme's
libfolder. - Your custom component renders the theme's widget or template as before.
Also read: