Skip to content

[question] Is there any way to use next version with material v5.x ? #17054

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

Closed
parth25 opened this issue Mar 20, 2025 · 3 comments
Closed

[question] Is there any way to use next version with material v5.x ? #17054

parth25 opened this issue Mar 20, 2025 · 3 comments
Labels
support: question Community support but can be turned into an improvement

Comments

@parth25
Copy link

parth25 commented Mar 20, 2025

I'm trying to use next version of mui-x with material v5.x but i'm getting this error

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '.../node_modules/@mui/material/utils' is not supported resolving ES modules imported from .../node_modules/@mui/x-data-grid/esm/material/icons/index.js
Did you mean to import "@mui/material/node/utils/index.js"?
    at finalizeResolution (node:internal/modules/esm/resolve:259:11)
    at moduleResolve (node:internal/modules/esm/resolve:933:10)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40)
    at link (node:internal/modules/esm/module_job:95:36) {
  code: 'ERR_UNSUPPORTED_DIR_IMPORT',
  url: 'file:///Users/x/Documents/Projects/x/node_modules/@mui/material/utils',
  page: '/'
}

Here is my env info

  System:
    OS: macOS 15.3.2
  Binaries:
    Node: 20.17.0 - /usr/local/bin/node
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 134.0.6998.89
    Edge: Not Found
    Safari: 18.3.1
  npmPackages:
    @emotion/react: 11.10.8 => 11.10.8 
    @emotion/styled: 11.10.8 => 11.10.8 
    @mui/base:  5.0.0-beta.40-1 
    @mui/core-downloads-tracker:  5.17.1 
    @mui/lab: 5.0.0-alpha.176 => 5.0.0-alpha.176 
    @mui/material: 5.17.1 => 5.17.1 
    @mui/private-theming:  5.17.1 
    @mui/styled-engine:  5.16.14 
    @mui/system: 5.17.1 => 5.17.1 
    @mui/types:  7.2.24 
    @mui/utils:  5.17.1 
    @mui/x-data-grid: ^8.0.0-beta.0 => 8.0.0-beta.0 
    @mui/x-internals:  8.0.0-beta.0 
    @mui/x-tree-view: ^8.0.0-beta.0 => 8.0.0-beta.0 
    @types/react: 18.2.0 => 18.2.0 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    typescript: 5.0.4 => 5.0.4 
@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 20, 2025
@michelengelen
Copy link
Member

No, that's not possible I am afraid. You would have to update material-ui... and to v7 at that. v6 we also cannot support.

@michelengelen michelengelen closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2025
@michelengelen michelengelen added support: question Community support but can be turned into an improvement and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 20, 2025
@michelengelen michelengelen changed the title Is there any way to use next version with material v5.x ? [question] Is there any way to use next version with material v5.x ? Mar 20, 2025
@parth25
Copy link
Author

parth25 commented Mar 20, 2025

in your blog that mentioned MUI X v8 components will be fully compatible with Material UI v5 and v6.
Blog : https://mui.com/blog/mui-x-v8-alpha-zero/

@michelengelen
Copy link
Member

Yes, the blog post mentions that, but during development we decided to remove support for v5 and v6. This was done because material ui v7 changed the import strategy to ESM. I am sorry that this impacts you, but this is what pre-releases are meant for. Breaking changes can occur and are to be expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants