Open borgfriend opened 1 year ago
Are you importing stuff directly from this file? I am asking because that is not supported. We allow imports up to level3, for e.g. @mui/material/styles
. All imports which are valid should work as expected. I guess this may be related to https://github.com/mui/material-ui/issues/35480
If this is not the case, please share e reproduction repository where we can check the issue.
We are not importing anything directly from this file.
I am encountering the problem with this repository https://github.com/catenax-ng/product-item-relationship-service-frontend.
I am experiencing a similar issue when trying to access TablePaginationActions
.
I wanted to add a new control to TablePaginationActions
, but still maintain current behaviour. TablePaginationActions
is imported from @mui/material/TablePagination/TablePaginationActions
which, due to being a level4 import is causing the above issue.
Is it possible that we can export TablePaginationActions
from @mui/material/TablePagination
?
I also just received this error with vitest, but I have been trying @mui/material-next
with it.
The following change fixed it for me:
// import Chip from "@mui/material-next/Chip";
import Chip from "@mui/material/Chip";
I'm not sure if there are other things that cause this, but I wanted to pass this on in case it helps someone.
EDIT: adding package.json
versions:
"@mui/icons-material": "^5.15.10",
"@mui/lab": "5.0.0-alpha.165",
"@mui/material": "^5.15.10",
"@mui/material-next": "6.0.0-alpha.123",
Is there any workaround for this? Trying to migrate to vite but ran into this. Spent another day trying to get it working to no avail.. my question on SO if anyone has any insight https://stackoverflow.com/questions/78815858/mui-icons-material-vitest-es-module-issue
@sterlingdcs-damian did you find a solution?
When using vite@4.0.4 and vitest@0.26.3 with @mui/material.
Starting with "@mui/material": "5.11.0",
I am getting the following error:
Following the advice from the error message does not fix the issue.
For the time being I reverted back to "@mui/material": "5.10.17" - the tests run without any issue.
Any advice on how to use the current version?