-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EISDIR Errors with pigment migration when using transformLibraries #211
Comments
From some more fiddling it looks like this cryptic error message is a result from providing a custom theme object that might not be valid to the createTheme function in next.config.mjs |
Actually now that I removed the erroneous theme config that was causing a simple button to not work, I attempted to add a basic Autocomplete straight from the documentation, and I'm getting a very similar error to above. Again, commenting out
The error
And the stack trace I posted in the original report proceeds after the above stack trace. |
I'm not sure who needs to see this, but I've been continuing on with building my project. The application works fine when running next development server ( Again, commenting out transformLibraries allows me to build the application, however as expected, in the output application the MUI components won't have the custom theme applied.
|
Hmmm, it's looking like some of theses EISDIR error can be circumvented by running the development server with |
Taking a look into this. From the error, it seems like Pigment is trying to read some path as a file but it is a directory. Doing a |
@brijeshb42 Super appreciate you looking into it! If there's something you'd like me to test with my build please let me know and I'll do my best to report back to you. |
@rhoiyds Could you push your exact code that's resulting in the error to a github repo ? |
@brijeshb42 I've spent the past hour attempting to strip out the sensitive elements of my project into a reproduction, however after stripping everything down, the problem doesn't seem to occur. There's a chance that there's some odd conflict with other logic occurring down the line, and pigment is for reason the one that logs the error. |
ADD FORCED CONSOLE LOG WHICH FILES ARE CIRCURED AND IGNORE ARRAY FOR NPM MODULES. So elegant solution |
I found out that having any import like (I am using vite.js.)
|
Steps to reproduce
Follow the the migration to pigment css example with a basic Next.js project.
Current behavior
Adding in a basic component from @mui/material/button casues the below error
Seeing that the error is coming from "transform", I comment out the below line in the next.config.mjs file and then the application builds.
transformLibraries: ['@mui/material'],
Expected behavior
The above error doesn't occur when
transformLibraries: ['@mui/material'],
is part of the next.config.mjs file.Context
For now I'll continue on with my project with the transformLibraries commented out, but I don't actually understand how this is going to affect my project. It seems to work with it uncommented.
Your environment
npx @mui/envinfo
Search keywords: pigment transformLibraries EISDIR
Search keywords:
The text was updated successfully, but these errors were encountered: