#MUI TS React Throwing Errors That Do Not Exist

15 messages · Page 1 of 1 (latest)

uncut shale
#

This problem is only happening in our Next.js app. It doesn't happen in our create-react-app.

Terminal Error:

event - compiled client and server successfully in 138 ms (185 modules)
Warning: Failed prop type: The prop `xs` of `Grid` can only be used together with the `item` prop.
    at Grid (/node_modules/@mui/material/node/Grid/Grid.js:369:49)
    at Header (webpack-internal:///./src/components/molecules/header.molecule.tsx:23:9)

Header Molecule (top line is line 23):

<Grid container spacing={2} className='header-topbar'>
// greatness happening here
</Grid>

Two days ago, and yesterday, there were a bunch of these errors when we tried to deploy our app to Azure. We did have the xs={{ styles_here }} attribute in here before the errors. They've since been removed. Yet, the error persists. Seems like a caching thing, but we haven't turned on any caching.

Any idea on what the issue may be?

trim aurora
#

does it occur locally?

uncut shale
#

Yes. I'm working locally right now.

trim aurora
#

try removing .next folder and running again

uncut shale
#

Deleted the folder.
Stopped app.
Started app.
Same error happened.

trim aurora
#

do you know when it worked for sure?

#

if so, checkout that commit

#

reinstall your node_modules

#

and run the type checker again

#

if it passes, do a git diff

#

and review what has changed between the working version and now

#

good lucking fix it, i bet it's something super trivial but frustrating to find

kindred hamlet
#

can you share the code snippet from where you're having the error, so it'll be easy to identify & understand