WSL DNS Issue

Out of the blue a problem resolving common domains popped up while I was using a WSL Linux image.

Some internet searching led me to this:

https://gist.github.com/coltenkrauter/608cfe02319ce60facd76373249b8ca6

The Github gist and the comments had me scared, but poking around in the Linux system running under WSL indicated that /etc/resolv.conf was symlinked to some non-existing file. This was probably something that WSL is doing under the hood based on its own configuration judging by the link.

All I had to do to solve this for my case was:

1
2
test/src/**/*.js
shopt -s globstar

Not at all certain if it will survive a reboot, but maybe that would have fixed the issue anyway.