I have encountered a weird issue where I get the following error, when I re-generate my lock file.
Cannot find module" @mui/icons-material/Close imported from within one of my node_modules. Did you mean to import @mui/icons-material/Close.js.
That is, after I remove node_modules, clean npm cache, delete lock file, install packages, the error occurs. The "@mui/icons-material" is already installed after this, so it is bewildering to me why it cannot find the module. I have tried with both yarn and npm.
Everything works fine if I just keep the original lock file. And I have checked that the package is only installed once.
For context, I am using nextjs + react + typescript + node v16.19.1 + npm v9.5.0 + yarn v1.22.19
This is the call Stack: