react-jsonschema-form: Errors with version 4.0 and material-ui 4
Installing version 4.0 @rjsf/core and @rjsf/material-ui, alongside with my material-ui 4, I get the warning
npm WARN @rjsf/material-ui@4.0.0 requires a peer of @rjsf/core@^3.0.0 but none is installed. You must install peer dependencies yourself.
(and indeed, in the package.json of @rjsf/material-ui one finds “@rjsf/core@^3.0.0” , that seems wrong)
Furthermore, if I ignore the install warning , npm start gives compile warnings
./node_modules/@rjsf/material-ui/dist/material-ui.esm.js
Module not found: Can't resolve '@mui/icons-material' in 'C:\wk\pcnt\trake\trake-ui\node_modules\@rjsf\material-ui\dist'
./node_modules/@rjsf/material-ui/dist/material-ui.esm.js
Module not found: Can't resolve '@mui/material' in 'C:\wk\pcnt\trake\trake-ui\node_modules\@rjsf\material-ui\dist'
… and when runnning I get on console
Error: Cannot find module '@mui/material'
at webpackMissingModule (material-ui.esm.js:1256:1)
at Module../node_modules/@rjsf/material-ui/dist/material-ui.esm.js (material-ui.esm.js:1256:1)
Using react 17 and Node 14 with
@material-ui/core: 4.12.3 @material-ui/system: 4.12.1 @material-ui/icons 4.11.2 @rjsf/core: 4.0.0 @rjsf/material-ui: 4.0.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
Commits related to this issue
- Fix #2721 - Manually bump `@rjsf/core` in all the `package.json` files in `peerDependencies` to `^4.0.0` - Updated `@rjsf/core` implementation of `Form` to add a new `_internalFormWrapper` prop that i... — committed to heath-freenome/react-jsonschema-form by heath-freenome 2 years ago
- (Hopefully) Fixed the issues described in #2721 (#2722) * Fix #2721 - Manually bump `@rjsf/core` in all the `package.json` files in `peerDependencies` to `^4.0.0` - Updated `@rjsf/core` implementat... — committed to rjsf-team/react-jsonschema-form by heath-freenome 2 years ago
- Follow up fix for #2721 - Make `peerDependencies` for `material-ui` and `semantic-ui` be `4.0.1` to match the feature change in previous PR — committed to heath-freenome/react-jsonschema-form by heath-freenome 2 years ago
- Follow up fix for #2721 (#2727) - Make `peerDependencies` for `material-ui` and `semantic-ui` be `4.0.1` to match the feature change in previous PR — committed to rjsf-team/react-jsonschema-form by heath-freenome 2 years ago
- Fix #2721 and #2724 - Updated the `MaterialUIContext` and `Mui5Context` to eliminate the `console.log()` entirely - Updated the `MaterialUIContextProps` and `Mui5ContextProps` to use `require` to impo... — committed to heath-freenome/react-jsonschema-form by heath-freenome 2 years ago
Will work on this soon
Yes, and like in #2762 was mentioned, that is hard to do with CRA.
Does this mean that there is not going to be a fix for this in near future?
How about you separate the Mui4 and Mui5 into separate packages and possible mark v4 as legacy version?
I and the users in #2762 are still having the same errors with
v4.1.0
as are being posted in that issue.