Property 'X' does not exist on type 'Record<never, string>'
See original GitHub issueHello
I’m trying to Migrate from MUI v4 to MUI v5, I’m following those guides:
https://mui.com/material-ui/migration/migration-v4/ https://mui.com/material-ui/migration/migrating-from-jss/#2-use-tss-react
Currently I have issue regarding classes, On some components the classes type I’m getting is Record<never, string> and when I try to use it, I’m getting Property ‘X’ does not exist on type ‘Record<never, string>’,
and on other components the classes type is correct.
App.js
import { ThemeProvider } from '@mui/material';
import theme from 'theme';
import CssBaseline from '@mui/material/CssBaseline';
import { Snackbar } from 'utils/snackbar';
import NoConnection from 'utils/NoConnection';
import MainRoutes from 'routes';
import { Provider } from 'react-redux';
import store from 'redux/store';
import { LocalizationProvider } from '@mui/x-date-pickers';
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
import createCache from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import '@fontsource/roboto/300.css';
import '@fontsource/roboto/400.css';
import '@fontsource/roboto/500.css';
import '@fontsource/roboto/700.css';
export const muiCache = createCache({
key: 'mui',
prepend: true,
});
function App() {
return (
<Provider store={store}>
<CacheProvider value={muiCache}>
<ThemeProvider theme={theme}>
<LocalizationProvider dateAdapter={AdapterDateFns}>
<Snackbar>
<CssBaseline />
<NoConnection />
<MainRoutes />
</Snackbar>
</LocalizationProvider>
</ThemeProvider>
</CacheProvider>
</Provider>
);
}
export default App;
Issue Analytics
- State:
- Created a year ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
'Property does not exist on type 'never' - Stack Overflow
I have an error saying 'Property 'name' does not exist on type 'never'. I don't understand how instance could ever be a 'never'....
Read more >Property does not exist on type 'never' in TypeScript | bobbyhadz
The error "Property does not exist on type 'never'" occurs when we try to access a property on a value of type never...
Read more >Property does not exist on type 'never' when it exists #38286
I do know workaround -- just move if over guard for "empty" interface as last one (what to do when there will be...
Read more >property 'value' does not exist on type 'never' - You.com
If you get the "Property does not exist on type 'never'" error, chances are you forgot to explicitly type a value and it...
Read more >Property does not exist on type 'never' ? - CodeProject
defaultValues, ]); const handleChange = (event: { target: { value: any; name: string } }) => { const newValue = event.target.value; ...
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
Hey, just passing by ! Did you use a custom property transition, in you’re MUI theme ?
Done
BTW do you know a better guide for mui 5 migration?