score:2
try this:
remove all dependencies by deleting node-modules folder in your project.
open a new terminal and run 'npm install'.
(those two instructions above are optional)
- since there has been a major change moving from mui v4 to v5, makestyles() is deprecated, so that you have to use styled() function instead, and import it from '@emotion/styled';
example:
import styled from '@emotion/styled';
const usestyles = styled(theme => ({
root: {
//your styling rules
}
}))
take a look at the following link as well, thanks for @tesladelmar 's answer:
https://www.reddit.com/r/reactjs/comments/uabs6g/material_ui_react_18/
good luck!
Source: stackoverflow.com
Related Query
- Uncaught Error: MUI: makeStyles is no longer exported from
- Material UI v4 makeStyles exported from a single file doesn't retain the styles on refresh
- How to fix the error 'alpha' is not exported from '@material-ui/core/styles' when using Skeleton in Material UI
- Getting error when try to use React Router v6: Attempted import error: 'Action' is not exported from 'history'
- Attempted import error : 'createLocation' is not exported from 'history'
- Faced this error while using React-Hook-Form and YupResolver: Attempted import error: 'set' is not exported from 'react-hook-form' (imported as 'o')
- Why am I getting the error "'CSS3DObject' is not exported from 'three'"?
- Attempted import error : 'required' is not exported from 'yup'
- IconButton from MUI no longer changes hover color with makeStyles?
- Exported variable 'store' has or is using name '$CombinedState' from external module error Redux toolkit and redux persist
- Received error Attempted import error: 'NotificationsNoneIcon' is not exported from '@material-ui/icons'
- error Attempted import error: 'NotificationsNoneIcon' is not exported from '@material-ui/icons'
- MaterialUI React duplicate keys error from mui components
- Icon is not exported from react-icons and compiler error is shown
- error in react " Attempted import error: 'TodoItem' is not exported from './Todoitem'. "
- while importing reacttable-6, I am getting this error "Attempted import error: 'ReactTable' is not exported from 'react-table-6'."
- Error Running React Native App From Terminal (iOS)
- Attempted import error: 'Switch' is not exported from 'react-router-dom'
- ReactJS giving error Uncaught TypeError: Super expression must either be null or a function, not undefined
- Attempted import error: 'useHistory' is not exported from 'react-router-dom'
- React: 'Redirect' is not exported from 'react-router-dom'
- TypeScript error after upgrading version 4 useParams () from react-router-dom Property 'sumParams' does not exist on type '{}'
- Uncaught Error: A cross-origin error was thrown. React doesn't have access to the actual error object in development
- Getting Error from webpack-cli: "TypeError: merge is not a function" in webpack config
- Switch' is not exported from 'react-router-dom'
- Error: Not implemented: window.scrollTo. How do we remove this error from Jest test?
- material-ui 'createSvgIcon' is not exported from '@material-ui/core/utils'
- Error when creating new object from existing one using `...`: In this environment the sources for assign MUST be an object
- Error with basic React Example: Uncaught TypeError: undefined is not a function
- withRouter' is not exported from 'react-router-dom
More Query from same tag
- How does react-router persist location state over page refreshes?
- Trying call useQuery in function with react-apollo-hooks
- On clicking component redirect to custom component
- How can redirct a user to specific url based on his role in this react-redux code
- Material Ui menu taking full width of the page
- TypeError: Cannot read property 'map' of undefined. Can't find a solution
- react webpack less loader
- Is there a way of using the useState hook to toggle className in react?
- The react component renders several times when using useEffect
- How to disable typechecking when using a logical operator or when the final result is allowed to be undefined
- how to expand only one collapse panel in ant-design
- "npm start" command in react app opens up 'nginx' welcome page on browser
- Why does google places autocomplete return an empty status and no data?
- React Router - Change state of other components
- Load image from server that requires sending headers
- How to change the background colour of button when clicked
- Why doesn't CSS work when I deproy the Next.js sample project in production?
- using react router with next.js
- How to count specific ID's in localStorage?
- How to do documentation in ReactJS?
- How to remove space between two rows of CSS flexbox?
- Access filtered data after the filtering in React
- React redux props don't update
- How to achieve infinite scrolling in React with variable height elements?
- Best way to ensure nested object value exists before calling it in Javascript
- Can't map array from mongoose in React
- TypeError: Cannot read property 'map' of undefined ReactJS APP
- How to refresh powerbi-client-react component once token has expired?
- Intercept event outside of Reactjs with native javascript
- How to make React Material UI <Grid> 100% width