-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
unstable_useIsFocusVisible is not exported from @mui/utils #43811
Comments
Just got the exact same problem, I have one goddamn package that's locking up my entire project because of this... |
Encountered the same issue. As a temporary workaround, I fixed it by |
@stabor705 @R3D347HR4Y @DaveITpl Can you anyone of you share codesandbox which reproduces the issue? |
Which package is showing this error? What version do you use? A reproduction could help us track the issue. |
@mui/base is not used as a dependency anymore in @mui/material or @mui/lab, so looks like this is related to an older version maybe? |
Hook is exported as MUI Dependencies
Console Error
Location Error Line Export from |
This looks related to #43538. It seems that the problem is simply about the version of As a user of Material UI v6, saving this should simply be about using |
Hey @oliviertassinari, Those are my mui packages:
Build error output✘ [ERROR] No matching export in "node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/index.js" for import "prepareTypographyVars"
node_modules/@mui/material/styles/createThemeWithVars.js:5:25:
5 │ import { prepareCssVars, prepareTypographyVars, createGetColorSchemeSelector } from '@mui/system/cssVars';
╵ ~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "node_modules/@mui/material/node_modules/@mui/system/esm/cssVars/index.js" for import "createGetColorSchemeSelector"
node_modules/@mui/material/styles/createThemeWithVars.js:5:48:
5 │ import { prepareCssVars, prepareTypographyVars, createGetColorSchemeSelector } from '@mui/system/cssVars';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "node_modules/@mui/lab/node_modules/@mui/utils/esm/index.js" for import "unstable_useIsFocusVisible"
node_modules/@mui/lab/node_modules/@mui/base/useButton/useButton.js:5:44:
5 │ import { unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "node_modules/@mui/lab/node_modules/@mui/utils/esm/index.js" for import "unstable_useIsFocusVisible"
node_modules/@mui/lab/node_modules/@mui/base/useSlider/useSlider.js:5:222:
5 │ ...tCallback as useEventCallback, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible, visuallyHidden } from '@mui/utils';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "node_modules/@mui/lab/node_modules/@mui/utils/esm/index.js" for import "unstable_useIsFocusVisible"
node_modules/@mui/lab/node_modules/@mui/base/useSwitch/useSwitch.js:5:85:
5 │ import { unstable_useControlled as useControlled, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
I had the same error and it was because I had mui/material at 6.x but mui/x-tree-view at 6.17.0. Once I upgraded tree-view to 7.18.0 the errors went away. |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
After the latest updates I still have the same problem. Unfortunately in sandboxes I was not able to prepare the error to open, so I prepared a test repository with all the configuration from my project, but without the code. After installing the yarn install packages and running the yarn start project the same error should be visible in the compilation errors. |
I have the same issue with Was able to temporarily solve the issue by using |
i have the same issue with yarn. i try install and build by npm then it oke. |
I believe it's similar issue to #44096. It should be fixed by #44096 (comment). |
Hey, @mariojsnunes! May I ask which version you used when the bug presented itself? The latest |
experiencing the same issue 💀 |
An updated If you encounter the same issue in |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @DaveITpl How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Hello, I still have this issue with these versions of mui.
Here is the error.
|
Turns out it works fine with |
I'm reopening, the migration guide for the lab looks wrong https://mui.com/material-ui/migration/upgrade-to-v6/#quality-of-life-improvements. @mui/lab needs to be at least |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @DaveITpl How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
@oliviertassinari after merging #44256, do you think it's worth updating the migration guide? |
Steps to reproduce
No response
Current behavior
After migrating from v5 to v6 I get an unusual error, the console displays absolutely nothing, but errors occur in compilation:
from build
Attempted import error: 'unstable_useIsFocusVisible' is not exported from '@mui/utils' (imported as 'useIsFocusVisible').
I can't tell if the problem is with my code or the @mui library. Could someone give me some valuable tips on how to debug this?
Expected behavior
No response
Context
No response
Your environment
npx @mui/envinfo
Search keywords: unstable_useIsFocusVisible, utils
The text was updated successfully, but these errors were encountered: