-
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
EINVAL: invalid argument, symlink #1961
Comments
bump |
Interestingly, |
I'm currently working around this with |
@meta-meta Well, you could do that, but it requires changes to docker images that are tightly coupled with your codebase. |
@adiachenko I don't love it, but it works for now. Hoping this goes away soon. |
bump - Exact same situation as OP |
I'm running into the same issue... The workaround provided by @meta-meta seems to work but that doesn't really work for my use case either. NPM seems to handle this perfectly. |
I am running into the same issue when installing create-react-app. any clue what to do to fix this? |
🍝 same problem |
I've created a small script that writes the bin links for all dependencies in |
+1 |
Thanks @novascreen - this worked beautifully for me! Plus I still don't need to use npm :-) |
The same errors in docker |
Yeah, docker uses smb on windows. Yarn isn't handeling mfsymlinks properly which breaks this. |
The weird thing is, npm is creating symlinks fine. I've tried to look into the difference of implementation for the two but haven't found a reason yet unfortunately. |
I have this error on Docker for windows, modules get installed in
Trying to install for example error An unexpected error occurred: "EINVAL: invalid argument, symlink '../../../acorn/bin/acorn' -> '/app/node_modules/falafel/node_modules/.bin/acorn'". But I go to I have no problem doing |
⏰ If you run yarn within a docker - the docker will inform the yarn as he is the Linux OS. Windows by default do not have a symbolic link. You should try run yarn within PC not in docker.
|
@FDiskas We get it. What we're wondering about at this point is the discrepancy between npm and yarn, because it seems like the former can handle this situation at least to some degree. |
I found the problem, this happens because of concurrency in creating symlinks which fails in this case with docker volumes. https://github.com/yarnpkg/yarn/blob/master/src/package-linker.js#L270 Changing concurrency to 1 fixes the issue. I've tried just to test if it fails with making many symlinks in parallel inside this node_modules (in which yarn fails), but simple case seem doesn't show any problems, that means that something related to specific yarn's linking flow and need to be investigated further. |
Nicely done! |
We would appreciate a bit more debugging and repro steps. |
Ok added a PR with repro steps. |
Wow this actually fixes it. I tried this fix on master on our vagrant box, which also uses SMB for sharing project folders and now when i install gulp through yarn and npm it doesn't break on invlaid symlink when using the "mfsymlink" mount option. Good find!
|
hello |
@brazitech look at the PR #3097. |
Docker is intended to isolate from the filesystem differences.
This way yarn wouldn't fail. P.S. I'm not saying yarn doesn't have an issue when dealing with SMB-mounted volume. |
To @Vanuan's point, I like to put an entry for |
@atrauzzi Well, The docker use case discussed here is the development one: you mount a source folder in runtime and run |
Ah yeah, definitely gotta watch for that :D |
* Remove concurrency in creating bin links Fix for #1961 * Add linkBinConcurrency constant and comment * Fix: semicolon
Problem still happens |
@whitecolor Yep verison was 0.12.0 |
Should be fixed in 0.26 |
@bestander Great) |
Yep
…On 26 May 2017 at 12:09, Dave ***@***.***> wrote:
@bestander <https://github.com/bestander> Great)
So can i use nightly build to development environment?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1961 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACBdWPlMEIvBGBgisYPosOToT1-j-94fks5r9rLNgaJpZM4K3tPb>
.
|
See yarnpkg/yarn#1961 (comment) Has been fixed since this JHipster build: https://hub.docker.com/r/jhipster/jhipster/builds/bzarq7nxrl3etg8xpnsmwnv/
because of issue yarnpkg/yarn#1961
This should be fixed right? Getting this error now in a |
Same using |
I'm seeing this issue running |
Can confirm that falling back to a |
So I'm getting this error, which I suspect I already know the reason for:
The reason this is happening is because I'm using Docker for Windows and the path it's looking to create a symlink on is actually backed by an NTFS filesystem. This is going to be fairly common for anyone trying to use yarn through a Docker container on Windows.
I'm not sure what the best course of action would be here, but I don't mind even just having to tell yarn to skip doing symlinks. You might however have an opportunity here to make the user experience a little nicer by detecting when this happens and either raising a warning, or improving the error feedback.
Anyway, this is a thing :)
The text was updated successfully, but these errors were encountered: