If you face this issue working with WSL, the root cause of the problem is invalid current directory.
How to fix it:
- open powershell
- select home directory
wsl -d DISTRO --cd ~
where DISTRO is the name of the distribution, that can be obtained
wsl -l