-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: illegal operation on a directory, read" error when using yarn install #4336
Comments
Hey, can you share the full error message? If there's a stack trace, directory path etc. |
Hey @BYK unfortunately I don't get any other error message/stack trace than what I provided. Is there another place on my filesystem that yarn logs verbose error messages to? Thanks, Jack |
@BYK is there any way to get more verbose output on what yarn tries to read when it fails? It's basically unusable right now... |
@the-jackalope sorry for the late response. In the meantime, have you tried clearing your cache? I'll try to reproduce this locally. |
I wasn't able to reproduce locally so I suspect you have a corrupted cache folder. I'd run |
No worries and thanks for getting back to me @BYK ! I tried I'm also realizing that Let me know if I can provide you anything else that would help debug - filenames, directory names, packages, etc. Thanks for the help 😃 |
Darn! Would you mind sharing the output when running with Sorry, I'll find a way to get better stack traces for these kind of things. It is very hard to see what is going on right now. Do you have any links (sym/hard) in your folder or inside your node_modules folders? Does it work the same with and without a node_modules folder? |
I know you mentioned |
When I run it inside of my current project directory (which contains a
Oddly it also fails in the parent directory of my project directory (which doesn't contain a
|
Wild guess: you have a |
Hahaaaa you are spot on! Not a genuine I feel like I've been wasting your time - apologies thank you so much for the help @BYK ! |
Wasting my time? No sir, |
So I've found the cause of the second error but the first one seems a bit different. May be you also have a |
Aha - yes there was also a |
I stumbled across this having the same error, my solution is different but it's here incase it helps anyone else, I was getting this Yarn error Running it again with the verbose option: verbose 0.36 Checking for configuration file "/Users/danielmorris/Projects/test/.npmrc".
verbose 0.361 Checking for configuration file "/Users/danielmorris/.npmrc".
verbose 0.361 Found configuration file "/Users/danielmorris/.npmrc".
verbose 0.361 Error: EISDIR: illegal operation on a directory, read
error An unexpected error occurred: "EISDIR: illegal operation on a directory, read". It seems it's looking for an |
@BYK I'm also getting this error after upgrading to yarn 1.2.0, but can't seem to find any Also, running |
@BYK There are some scripts in my package.json: "bootstrap": "yarn --verbose || cnpm i || npm i",
"dev": "node build/dev-server.js",
"start:server": "nodemon --watch test/mock ./config/json-server.index.js",
"startDev": "concurrently \"npm run bootstrap\" \"npm run start:server\" \"npm run dev\"" When I run "yarn " to install dependencies, everything goes right. # error message
error Could not open cafile: EISDIR: illegal operation on a directory, read node: v8.6.0 |
Having the same error here:
|
Note this duplicate #4695 contains a repro-script , Dockerfile or just git clone of a public project. |
It happens to me during my Basically all I'm doing is defining a "lint" script that eslints my codebase and then calling
When I call |
|
I get the same error, but no "file" folders as described above ( directory named package.json, .yarnrc or .npmrc). I'm getting this when I am running a script. The script runs fine, but the error is there. |
@phun-ky I have the same issue |
This error when being run as part of an NPM or Yarn hook/script is a duplicate of #4695 and is fixed by #4700 however that fix is not yet in a released version. @griest024 |
can we expect a 1.2.2? there have only been fix commits since 1.2.1 |
|
Closing since this should be fixed and released :) |
This version fixes an issue with version 1.2.1 where `yarn install` would fail with error `EISDIR: illegal operation on a directory` as documented by yarnpkg/yarn#4336.
I'm still experiencing this in My error is:
|
@davidthornton please file a new issue with repro steps :) |
Ahhh 😱 I only get this intermittently, and only during CI (we use Docker Cloud, so we can't inspect the yarn error logs - things just fail and retried builds usually succeed). To make matters worse, we run However, I will look at trying to put together a repo somehow, shortly! |
A weird trick helped me. I had Does it mean I have a file named |
@vladgolubev I believe that is related more to jestjs/jest#5272 and is not yarn specific. That issue is then related to an issue in yargs or some transitive dependency of jest. |
I have this issue, just trying to run
|
Just recently this happens to my system when running
|
I had the same issue. There was a linked folder in my directory which was causing the issue. i added that folder to ignore list and then it started working fine as expected. |
C:\Users\ANONYMOUS>npm install -g @angular/cli TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined C:\Users\ANONYMOUS> |
I am getting above error while installing npm. |
Try locating and removing the .npmrc folder that is located in c:/users/your username/.npmrc |
I am still getting this error while trying to call |
HI sorrywm, Do u solve this issue? I also have the same problem: |
Ok, I'm experiencing the original reported error (there is a package.json file on parent directory), but there is also a package.json on the current directory, so, is this bug (the original one) fixed? |
I have solved the issue by deleting the package.json on in the parrent dir |
The thing is that I don't want to delete the package. json of the parent thir, it is a legit one |
Hi,
|
Hey @Mihai-github , I'm also having this issue with React-Native and Yarn Workspaces - did you figure out the solution? |
None of the above worked for me. It turned out the problem was I had |
This is so wierd. I got the same error and all of the solutions above (or better yet the causes) where not what I had a problem with at all. For some reason when I removed yarn.lock and did a new install calling yarn everything when ok. |
I had this same error, and my solution was to look in my $ rm -rf ~/yarn-error.log ~/.npmrc |
When running
yarn install
command, I get the error:An unexpected error occurred: "EISDIR: illegal operation on a directory, read".
yarn-error.log:
package.json:
The text was updated successfully, but these errors were encountered: