You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
yarn install fails inside /mnt with EINVAL for lstat during step 3 #2448
Your Windows build number: Version 10.0.16273.1000
What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)
Running yarn (install) in a directory inside /mnt/c/Users/foo/bar
$ pwd
/mnt/c/Users/duybui/code/web/old
$ yarn
yarn install v0.27.5
warning package.json: No license field
info No lockfile found.
warning [email protected]: No license field
[1/4] Resolving packages...
warning aurelia-cli > npm > request > [email protected]: Use uuid module instead
warning browser-sync > browser-sync-ui > weinre > [email protected]: express 2.x series is deprecated
warning browser-sync > browser-sync-ui > weinre > express > [email protected]: connect 1.x series is deprecated
[2/4] Fetching packages...
warning [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "[email protected]" has unmet peer dependency "react@^0.14.0 || ^15.0.0".
error An unexpected error occurred: "EINVAL: invalid argument, lstat '/mnt/c/Users/duybui/code/web/old/node_modules/accord/node_modules/cliui/README.md'".
info If you think this is a bug, please open a bug report with the information provided in "/mnt/c/Users/duybui/code/web/old/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
What's wrong / what should be happening instead:
Note that every time I run the command it may fail while lstat'ing a different file.
Reacted by Vu Bui, Jonas Frost, Tara Harris, Sean, ardhitama, David Avikasis, Felipe Leusin, wolleson, Cameron Welter, Manuel Bieh and 28 more
My current workaround is to create a node_modules directory outside /mnt, then ln -s it into my directory inside /mnt.
Reacted by Luis Lavena, Peter Grman, Dani Catalan, Brody McKee, Peter Juras, Rüdiger Schulz, Carlos González, jazoom, Mikael Balin, Steve J Calamia and 2 more
Also getting this when adding a dependency from the command line. I can install packages successfully using npm, so am I correct in thinking that this is a Yarn issue, not a WSL one?
This looks like it's the same error in React Native's packager (roughly equivalent to webpack --watch):
✘130 ➜ yarn start
yarn start v1.0.1
$ node node_modules/react-native/local-cli/cli.js start
Scanning 723 folders for symlinks in /mnt/c/code/learning-hub/mobile-app/node_modules (80ms)
┌────────────────────────────────────────────────────────────────────────────┐
│ Running packager on port 8081. │
│ │
│ Keep this packager running while developing on any JS projects. Feel │
│ free to close this tab and run your own packager instance if you │
│ prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/mnt/c/code/learning-hub/mobile-app
Loading dependency graph...
React packager ready.
Loading dependency graph, done.
Bundling `index.android.js`
Transforming modules 100.0% (913/913), done.
ERROR EINVAL: invalid argument, lstat '/mnt/c/code/learning-hub/mobile-app/.git/index.lock'
{"errno":-22,"code":"EINVAL","syscall":"lstat","path":"/mnt/c/code/learning-hub/mobile-app/.git/index.lock"}
Error: EINVAL: invalid argument, lstat '/mnt/c/code/learning-hub/mobile-app/.git/index.lock'
at Error (native)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
error Command failed with exit code 11.
We have been trying to get to the bottom of this issue, but the bug seems very evasive. Every time we try to gather an strace or put it under the debugger, it does not repro. Seems like some kind of race condition. If someone is able to get a strace of the failing command, that might shed some light. strace -o <trace_file> -ff <failing_cmd>
That's not really a fair answer, @muyu66. First, it's not true that npm@6 matches Yarn in terms of functionality. More importantly, WSL is not meant to be limited to a subset of tools, and you can't expect development teams to drop Yarn because none is "recommended".
Sorry if I haven't made myself clear: The error I'm experiencing is more related to #2606, that is, I can't build (my own projects) using make -j<anything larger than 1>. I've posted about it here because this thread contains the workaround and claims that the issue has been fixed.
I'll make a new issue to avoid further confusion.
Activity
khuongduybui commentedon Aug 24, 2017
My current workaround is to create a node_modules directory outside /mnt, then
ln -sit into my directory inside /mnt.umamialex commentedon Aug 24, 2017
Related issue in the Yarn repo: yarnpkg/yarn#4188
hikurangi commentedon Sep 3, 2017
Also getting this when adding a dependency from the command line. I can install packages successfully using npm, so am I correct in thinking that this is a Yarn issue, not a WSL one?
I'm on 16281.rs3 fwiw.
khuongduybui commentedon Sep 4, 2017
It's a WSL issue with the recent file system later changes
tjmonsi commentedon Sep 4, 2017
It fails on the new build of windows. I reverted back to 16251.rs3 and yarn works fine again
sunilmut commentedon Sep 5, 2017
Adding Sven Groot (@SvenGroot) who is taking a look at this. Also, marking it as a bug.
treebeard commentedon Sep 10, 2017
Also fails on 16278.rs3, npm works fine
simonbuchan commentedon Sep 11, 2017
This looks like it's the same error in React Native's packager (roughly equivalent to webpack --watch):
This one is pretty intermittent though.
sunilmut commentedon Sep 14, 2017
We have been trying to get to the bottom of this issue, but the bug seems very evasive. Every time we try to gather an strace or put it under the debugger, it does not repro. Seems like some kind of race condition. If someone is able to get a strace of the failing command, that might shed some light.
strace -o <trace_file> -ff <failing_cmd>AndyGauge commentedon Sep 14, 2017
I attempted to create a react app using yarn
create-react-app hello-apiand ran it through the strace recommended. I zipped up the output.https://github.com/AndyGauge/yarn-debug/blob/master/yarn-fail.zip
khuongduybui commentedon Sep 15, 2017
When I run
strace -o ~/trace.log yarn installthe error does NOT show up.When I run
strace -o /dev/null yarn installthe error DOES show up.AndyGauge commentedon Sep 15, 2017
rails webpack:installfails with the same message. The trace.log file: https://github.com/AndyGauge/yarn-debug/blob/master/trace.logCrshOverride commentedon Sep 15, 2017
I was able to reproduce locally. You can download a zip of all of the trace files at https://www.dropbox.com/s/oy78n0qvtqqyxwb/yarn_trace.zip?dl=0
hikurangi commentedon Sep 16, 2017
If it helps, for me the problem seems to be resolved in 16288.1.
91 remaining items
mindhaq commentedon Dec 7, 2017
Rich Turner (@bitcrazed) Apart from slow IO it is working fine now, thank you!
It's good to hear that disk perf is being addressed. Is there an Issue to follow on?
bitcrazed commentedon Dec 7, 2017
Thanks for letting us know.
The larger disk perf issue is primarily being tracked in issue #873
shjyh commentedon Dec 11, 2017
I upgrade my OS to newest insider preview(17025.10000),still have this problem
therealkenc commentedon Dec 11, 2017
this
Nadav-Ruskin commentedon Jul 15, 2018
I am using Windows version 1803, build 17134.112 and still encountering this bug (the general, parallel building bug).
su-zhuzhu commentedon Jul 17, 2018
Nadav (@Nadav-Ruskin) NPM 6.0 is recommended, It is no worse than yarn now
mrmckeb commentedon Jul 17, 2018
That's not really a fair answer, @muyu66. First, it's not true that npm@6 matches Yarn in terms of functionality. More importantly, WSL is not meant to be limited to a subset of tools, and you can't expect development teams to drop Yarn because none is "recommended".
Nadav-Ruskin commentedon Jul 17, 2018
Sorry if I haven't made myself clear: The error I'm experiencing is more related to #2606, that is, I can't build (my own projects) using
make -j<anything larger than 1>. I've posted about it here because this thread contains the workaround and claims that the issue has been fixed.I'll make a new issue to avoid further confusion.
tomitrescak commentedon Aug 6, 2018
I am receiving this bug still on the Creators Edition and having the "EINVAL: invalid argument, lstat" I can provide the package.json
onomatopellan commentedon Aug 6, 2018
Tomas Trescak (@tomitrescak) what build? (Win+R -> type
winver)Your OS build number should be 16299.98 or later to get this fix.
tomitrescak commentedon Aug 6, 2018
Ah, ok, I got 16299.64, installing update now.