Compiling / Loading app results in Error: EISDIR: illegal operation on a directory, read #164
Labels
package: system
Specific to @mui/system
status: waiting for author
Issue with insufficient information
Steps to reproduce
I am unable to get this to fail in a codesandbox that I've setup with a similar structure. However, I'm hoping that by looking over the screenshots of logs and code, you might be able to help pinpoint where the problem is coming from. The problem occurs when compiling while webpack, pigment-css and wyw-in-js are loading the modules in my project.
Current behavior
As it loads the modules, it is hitting the error
EISDIR: illegal operation on a directory, read
because it is trying to read a directory as a file. The path is not coming from any of my code, but looks to be coming from pigment-css. The directory it is trying to read as a file is:...@mui/utils/generateUtilityClass
(see screenshot)Hoping that maybe it's some sort of type-o in the code somewhere that you can just search for and fix? I couldn't find it anywhere.
Expected behavior
Should compile and load without errors.
Context
I'm trying to use nextjs app router with React Server Controls and using pigment-css for the css for these controls. I am also using client controls and MUI styles and themes for these client controls. I'm trying to get this to all work together and keep hitting a number of problems that I've been working around to try to get an app up and running. If I debug and change the path it's trying to read, then it works.
Your environment
System: OS: Windows 11 10.0.22621 Binaries: Node: 22.1.0 - C:\Program Files\nodejs\node.EXE npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD pnpm: 9.4.0 - ~\AppData\Local\pnpm\pnpm.EXE Browsers: Chrome: Not Found Edge: Chromium (126.0.2592.68)
In addition, here is some additional context from debugging...
As the modules are being loaded, this is where we hit the error - when loading
![image](https://private-user-images.githubusercontent.com/76228839/344345165-fed5ac66-1ac7-4fa1-9fb3-66f627b78bbb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NjMyODQsIm5iZiI6MTczOTc2Mjk4NCwicGF0aCI6Ii83NjIyODgzOS8zNDQzNDUxNjUtZmVkNWFjNjYtMWFjNy00ZmExLTlmYjMtNjZmNjI3Yjc4YmJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDAzMjk0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUxOTJiZDg3MDU1MzNhOWFlNTkwYWFkNGFmZDgwNzIxYzE4YTUyZTQ0N2Y1M2RlODk0MTNhZGJiOWE5MzE3YjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XnYZw9umbfdHs-tYpdID08huUw4XWFR6hIeIeV1dkcg)
@mui/utils/index.js
These log results are coming from this code in
![image](https://private-user-images.githubusercontent.com/76228839/344345552-a788fa0d-2c94-4b96-95d9-171cec1e0977.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NjMyODQsIm5iZiI6MTczOTc2Mjk4NCwicGF0aCI6Ii83NjIyODgzOS8zNDQzNDU1NTItYTc4OGZhMGQtMmM5NC00Yjk2LTk1ZDktMTcxY2VjMWUwOTc3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDAzMjk0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc1ZmRkMTkwOTZiNzY1ZDBlMjRkNjhlNDJhMzYwYWIyYWE1YTg2MWRjYjkyOThhMzI0ZDU0NGM5YjMxYWZlY2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.7Kt4cS4-jNacgmzDqsj-onczXgychqca3FCBkK7MXRY)
@pigment-css > unplugin > build > index.js > async transform()
The error is happening here in
![image](https://private-user-images.githubusercontent.com/76228839/344346053-9148e314-faa1-4d76-9660-22a5efdefb0c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NjMyODQsIm5iZiI6MTczOTc2Mjk4NCwicGF0aCI6Ii83NjIyODgzOS8zNDQzNDYwNTMtOTE0OGUzMTQtZmFhMS00ZDc2LTk2NjAtMjJhNWVmZGVmYjBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDAzMjk0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA5OWIwYWViNmZiOTllMTI4ZWZiMjgxNzhmYjllZTQ1ODM5YmU2YTg5ODgyYTA5OGU4NjU3NDI5ZTViNzg2MDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.liQWO4uSm8u1IJpOrsK7eORRoSdJccn5IXqmqJ02zFs)
@wyw-in-js > transform > lib > transform > Entrypoint.helpers.js > loadAndParse()
Search keywords: EISDIR: Illegal operation on a directory
The text was updated successfully, but these errors were encountered: