-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Breaking change introduced in v5.11.11 #36384
Comments
Similar issue with Autocomplete:
|
Breaking change was introduced to MUI Base by this PR: #36235 We included the following note in the 5.11.11 release note: https://github.com/mui/material-ui/releases/tag/v5.11.11
-import { useBadge } from '@mui/base/BadgeUnstyled';
+import useBadge from '@mui/base/useBadge'; You can use this codemod to help with the migration. MUI Material UI isn't expected to be affected. By looking at the error message you provided, it seems like you haven't cleared the |
@hbjORbj The error is coming from our CI/CD environment. Are we suppose to clear the node_modules every time we deploy? I understand that you put a comment in your release notes that this is a breaking change. But that doesn't make it right. It's a patch release. There should be no breaking changes. |
The breaking change notice was about the |
@michaldudak I'm not sure I fully understand, but I believe what you are saying is that the breaking change wasn't suppose to leak outside of MUI, but it did. |
Could you please run |
@michaldudak not sure this will be super helpful as it's from my dev environment, not our CI/CD which was breaking. But it's the production branch. System: |
Yeah, it doesn't help as it uses the older version of @mui/material. How come your CI environment is different, though? Do you use lockfiles? I suspect the reason for your failing builds is a mismatch of package versions. It seems that your CI somehow updated |
More info... I can now reproduce this on my local env. The same error shows up for: npx @mui/envinfo: If I do yarn add @mui/base the build is successful. After this npx @mui/envinfo shows different version for @mui/base: Just to verify, I removed @mui/base which breaks consequitive builds showing @mui/base version to be @mui/base: 5.0.0-alpha.118 |
@mui/[email protected] requires @mui/[email protected] (see https://unpkg.com/browse/@mui/[email protected]/package.json). Updating just Material UI without its transitive dependencies is what causes the error you're experiencing. |
@michaldudak can you calrify? @mui/base being transitive, we don't have it in our package.json. How is the update suppose to have happened? |
For anyone fetching errors similar to: I had similar problem (reported in this thread), when recreating yarn.lock file, non listed The following versions listed in my
npx @mui/envinfo:
I may conclude that bumped versions broke the The solution in my case is to use
|
@artyil Can you share a repo that we can take a look? |
Updating the @mui/material should have also updated its dependencies. There could be an error or misconfiguration of your CI if it didn't happen automatically. |
@frontyard Would be great if you could share more detail about your CI? it is likely because of your CI setup. I could not reproduce the error locally, here is what I tried:
|
@siriwatknp Nothing out of the ordinary. It's a github action that runs yarn install and yarn build all wrapped in a docker container. What info would help you figure this out? |
I think that we should close this issue. The root of the problem looks to be related to how npm dependencies are resolved wrongly, against what |
@frontyard We're really sorry for the issue that you encountered but in this case, there is no workaround that we can provide. What we could try is to bump the minor version (if we have breaking changes with the experimental APIs/packages) as you ask but I'm still not sure if it helps since the problem is not from our side, cc @michaldudak. |
Duplicates
Latest version
Steps to reproduce 🕹
I believe following error is due to breaking changes introduced in version 5.11.11. We are forced to lock version numbers in our package.json
Not long ago we had to deal with another MUI patch release introducing breaking changes. Can you please stop doing this and bump minor version if you are introducing breaking changes, so we can follow a sane upgrade process? Please!
ERROR in ./node_modules/@mui/material/Badge/Badge.js 9:0-42
Module not found: Error: Can't resolve '@mui/base/useBadge' in '/app/node_modules/@mui/material/Badge'
resolve '@mui/base/useBadge' in '/app/node_modules/@mui/material/Badge'
Parsed request is a module
using description file: /app/node_modules/@mui/material/Badge/package.json (relative path: .)
aliased with mapping '@mui/base': '/app/node_modules/@mui/base' to '/app/node_modules/@mui/base/useBadge'
using description file: /app/node_modules/@mui/material/Badge/package.json (relative path: .)
Current behavior 😯
Patch release introduces breaking changes.
Expected behavior 🤔
Patch release SHOULDN'T be introducing breaking changes.
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: