question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: UNKNOWN: unknown error, lstat on WSL symbolic links

See original GitHub issue

Thanks for your effort on this project. I’m using fast-glob in a PHP language server and am getting reports from users about lstat errors. Most of these users are on Windows and are using WSL, though a minority appear not to be using WSL.

This is the issue containing most of the information: https://github.com/bmewburn/vscode-intelephense/issues/260

This may also be useful: https://github.com/Microsoft/WSL/issues/1524

I’m not a Windows user myself but will try and add some further info later.

Environment

Windows

Actual behavior

Error: UNKNOWN: unknown error, lstat 'e:\firma\fbpopular\public\storage'

Expected behavior

No error.

Steps to reproduce

  1. Try and find files in a dir structure that contains symbolic links on windows WSL

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mrmlnccommented, May 17, 2019

So, after research: the node-glob package just ignore error from lstat call.

This is will be work correctly after #163, but only with Node.js 10.10+. I’ll think about how to handle situation on Node.js below 10.10.

0reactions
mrmlnccommented, May 29, 2019

Unfortunately, the correct behavior is only guaranteed for Node.js 10.10+. For the correct operation of the package requires information about what the file in front of us: symbolic link, file or something else. We cannot ignore the lstat error, otherwise, there will be inconsistency between modes: string, dirent and stat.

So, right now VS Code build with Node.js 10.2.0. The next update was delayed (https://github.com/microsoft/vscode/issues/61787).

I will describe this behavior in the documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nodejs Development - WSL and Windows: Unknown error ...
Solution: In my case, the problem has to do with how npm is connecting dependency scripts to my project. In WSL, npm uses...
Read more >
KJS / Gradle: A symlink produced from a wsl linux build ...
The yarn-error.log shows the same issue, that the symlink can't be resolved. ... error An unexpected error occurred: "UNKNOWN: unknown error, lstat ......
Read more >
Windows error in meteor
I am getting the following error when creating or running a meteor app. ... throw error; ^ Error: UNKNOWN: unknown error, lstat ......
Read more >
failed to create symbolic link - no such file or directory [closed]
Edit: Ok, the problem seems to be that it when the path includes a space, it thinks the name stops at this space...
Read more >
Npm errors when installing packages on windows share
Running with --no-bin-links fixed it for me: npm install --no-bin-links. --no-bin-links tells npm to not create any symbolic links.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found