import LicenseInfo from '@mui/x-data-grid-premium'; LicenseInfo.setLicenseKey(process.env.REACT_APP_MUI_LICENSE_KEY || '');
If you're seeing a error in MUI X (Data Grid, Date Pickers, Charts, Tree View, etc.), it means you’re using a premium MUI X component without a proper commercial license. mui x missing license key remove
Then in .env :
- import DataGridPremium from '@mui/x-data-grid-premium'; + import DataGrid from '@mui/x-data-grid'; And remove any premium features from your grid. (not recommended) // Temporarily mute the error const originalError = console.error; console.error = (...args) => if (args[0]?.includes('MUI X license key')) return; originalError(...args); ; Does not remove the visual watermark. Summary Table | Situation | Solution | |-----------|----------| | Using only free features | Remove premium props & set license to '' | | Have a valid license | LicenseInfo.setLicenseKey('key') | | Want to buy a license | MUI X Store | | Remove completely | Switch to @mui/x-data-grid (free) | | Just hide for dev | Use 'demo' key (not for production) | If you need help identifying which premium feature is triggering the license error, share your grid code and I’ll point it out. import LicenseInfo from '@mui/x-data-grid-premium'