'experimental_sx' is not exported from '@mui/system'
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Steps to reproduce 🕹
Link to live example:
Steps:
- Use experimental_sx in the app 2.npm install & run the app 3.It will show (./node_modules/@mui/material/esm/styles/index.js Attempted import error: ‘experimental_sx’ is not exported from ‘@mui/system’.)
Current behavior 😯
The app is crashing.
Expected behavior 🤔
No response
Context 🔦
It is imported like this : import {adaptV4Theme, createTheme, responsiveFontSizes, experimental_sx as sx, alpha, lighten} from ‘@mui/material/styles’;
This code was untouched for months and was working fine till yesterday.
Your environment 🌎
npx @mui/envinfo
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Issue Analytics
- State:
- Created 9 months ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
reactjs - React build failed with error export 'experimental_sx ...
Failed to compile. export 'experimental_sx' (reexported as 'experimental_sx') was not found in '@mui/ ...
Read more >Troubleshooting - Material UI - MUI
This error arises because makeStyles is now exported from the @mui/styles package, which does not know about Theme in the core package.
Read more >emotion/babel plugin not working with `experimentalStyled as ...
We are currently working on adding documentation for the experimentalStyled() (will be soon exported as a styled() from @material-ui/core/styles ...
Read more >export 'import_react3' is not defined in module - You.com
Apparently since I am using MUI I need to install @emotion/react and ... (those not in the GOTINKER tree) using the standard module...
Read more >Introducing the New JSX Transform – React Blog
This upgrade will not change the JSX syntax and is not required. ... React in order to use Hooks or other exports that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Indeed @siriwatknp , updating package json solves the problem.
I had the same issue yesterday, I think that eventually the @mui/material was behind @mui/styles, speaking of version compatibility. Yesterday the 5.11.0 was released with a breaking change https://github.com/mui/material-ui/pull/35150
So @mui/styles ^5.8.6 is using releases from 5.8.6 to < 5.11.0, but @mui/material stays at 5.8.6. The solution is to update both and/or add the caret. Then, a little npm ci and you’re good.
For reminder ^version “Compatible with version”, will update you to all future minor/patch versions, without incrementing the major version. This is explicited in mui versioning strategy documentation.
Can you provide which version of
@mui/*
do you have in your package.json?Also, can you try with the latest version
@mui/material: "^5.11.0"
?