question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property 'X' does not exist on type 'Record<never, string>'

See original GitHub issue

Hello

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>’,

image image image

and on other components the classes type is correct. image

image

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:closed
  • Created a year ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JeanGautierSherpascommented, Sep 21, 2022

Hey, just passing by ! Did you use a custom property transition, in you’re MUI theme ?

0reactions
Mohammed-Mounircommented, Sep 21, 2022

Done

BTW do you know a better guide for mui 5 migration?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found