I don't know if this happened to someone else, but I got this error when I used the WSL mapping that starts with \\wsl.localhost, which it said didn't exist. When I instead switched to using the letter mapping I assigned in Windows explorer, like Z:\ ... it was not invalid anymore.