-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataGrid] The DataGrid is not compatible with the new package name of the core repository #2527
Comments
Same is happening here:
|
The problem with the last version is that The next release of the Grid should solve it |
@mui/material@5.0.0-rc.0
Is there any temporary solution to allow @mui/x-data-grid with @mui/core? Or are we forced to keep using the @material-ui beta? |
Yes, you can add a few aliases to your '@material-ui/core': '../node_modules/@mui/material'
'@material-ui/styles': '../node_modules/@mui/styles'
'@material-ui/icons': '../node_modules/@mui/icons-material'
'@material-ui/lab': '../node_modules/@mui/material' |
@m4theushw is that achievable with CRA without ejecting or using things like cra rewired and such? |
@rart No I don't believe so. |
@rart @stevenkampen Yes, I managed to make it work with v5 by using /~https://github.com/aze3ma/react-app-rewire-aliases. I didn't have to eject. I used the following aliases: // config-overrides.js
const rewireAliases = require('react-app-rewire-aliases');
const path = require('path');
module.exports = function override(config, env) {
config = rewireAliases.aliasesOptions({
'@material-ui/core': path.resolve(__dirname, './node_modules/@mui/material'),
'@material-ui/styles': path.resolve(__dirname, './node_modules/@mui/styles'),
})(config, env);
return config;
}; |
I did It did give me some trouble...
...but after clearing node modules and yarn add/remove a couple of times it seems to be working. Despite the hiccups, no rewiring or eject is needed using this route. Hope the bug is solved soon. |
This is kinda stupid @material-ui team. Before release -> naming "tidying up" is non-sensical. The upgrade path from v4 to v5 should have been smoother, and while I understand that breaking changes need to happen - at least plan them accordingly and let people who migrated early on the @next train to have smooth sailing. Now it's just a clusterfuck, massive renames, semi working codemods and on top of that core libraries that don't work with each other. 🤦 Do better. |
Tried this and unless I am doing it wrong (possibly xd) it is not working for me.
I have tried without the whole |
For Next.js version i use this config, work with 95% (litle css problem). If you have any sugestions //.babelrc {
"presets": ["next/babel"],
"plugins": [
["module-resolver", {
"root": ["./"],
"alias": {
"@material-ui/core": "../node_modules/@mui/material",
"@material-ui/styles": "../node_modules/@mui/styles",
"@material-ui/icons": "../node_modules/@mui/icons-material",
"@material-ui/lab": "../node_modules/@mui/material"
}
}]
]
} |
After some testing, I got it working with:
in my Thanks! |
For people that need a v5 compatible version and don't want to wait for the next release, you can use packages generated by #2571. "@mui/x-data-grid-pro": "https://pkg.csb.dev/mui-org/material-ui-x/commit/9f39f255/@mui/x-data-grid-pro",
"@mui/x-data-grid": "https://pkg.csb.dev/mui-org/material-ui-x/commit/9f39f255/@mui/x-data-grid", Example: https://codesandbox.io/s/material-demo-forked-shhg4?file=/demo.js @Khatib-Abbas What is your "little css problem"? It might be some conflict between jss and emotion, it happed with me. |
Thanks, @m4theushw! Sorry for the off-topic question but this is pretty useful: how is it that one manages to publish like that? I didn't manage to find docs or anything for |
@flaviendelangle Hello, there is any update with this issue ? |
@jbty you can follow this comment to have the new naming today #2527 (comment) Otherwise, we have merged the migration. |
Duplicates
Latest version
Current behavior 😯
When you replace the old
@material-ui/*
with the newer@mui/*
packages for the rc versions, the datagrid is breaking.Expected behavior 🤔
It should work with the new package names
Steps to reproduce 🕹
Click link https://codesandbox.io/s/vigilant-noyce-xx89p?file=/src/Demo.tsx
or alternatively:
@material-ui/*
packages@mui/*
packagesContext 🔦
No context, but a simple workaround for now.
You can add this to package.json to alias the new packages to the old
You can also do this via webpack but for some reason, it worked with storybook's webpack but not with nextjs's webpack.
Your environment 🌎
`npx @mui/envinfo`
Order ID 💳 (optional)
28357
The text was updated successfully, but these errors were encountered: