Error while using in latest MUI
See original GitHub issueI am getting the below error using this library in the latest version on mui.
As soon as I add the library and add the below component I get this error.
import React from "react";
import Carousel from "react-material-ui-carousel";
import { Paper, Button } from "@mui/material";
function Example(props) {
var items = [
{
name: "Random Name #1",
description: "Probably the most random thing you have ever seen!",
},
{
name: "Random Name #2",
description: "Hello World!",
},
];
return (
<Carousel>
{items.map((item, i) => (
<Item key={i} item={item} />
))}
</Carousel>
);
}
function Item(props) {
return (
<Paper>
<h2>{props.item.name}</h2>
<p>{props.item.description}</p>
<Button className="CheckButton">Check it out!</Button>
</Paper>
);
}
export default Example;
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Troubleshooting - Material UI - MUI
This document covers known issues and common problems encountered when migrating from Material UI v4 to v5.
Read more >material ui is showing error while installing - Stack Overflow
material-ui uses react versions 16 or 17 as the peer dependencies even if you've react version 18 in your root project.
Read more >Compile error while trying to install Material UI #32455 - GitHub
After installation of Material-ui - on April 23rd, using the available file on site, I'm can't run my application. I'm using React 18.0....
Read more >module not found: error: can't resolve '@mui/material/styles'
To fix this error, you must install the package '@mui/material ' before using it. Open the terminal and run the following command to...
Read more >Error Boundaries - React
In the past, JavaScript errors inside components used to corrupt React's internal state and cause it to emit cryptic errors on next renders....
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 FreeTop 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
Top GitHub Comments
This package seems to be incompatible with React 18. To fix the problem, add this to your projects
package.json
file:Be sure to delete your
node_modules
folder andpackage-lock.json
. Then runnpm install
to create them again.Since this seems to be a React 18 issue, I will be closing this. The carousel now supports React 18 from version v3.4.0 onwards.