The Wayback Machine - https://web.archive.org/web/20210109224734/https://github.com/vercel/next.js/discussions/17675
Skip to content
1

Next.js suddenly does not work in WSL 2 (can't open localhost in browsers) if I turn on VPN #17675

dorklord23 asked this question in Help
Next.js suddenly does not work in WSL 2 (can't open localhost in browsers) if I turn on VPN #17675
94d ago · 3 answers

Hi, guys.

I have Next.js repo and have been working on it in WSL 2 without problem. Suddenly, today it doesn't work anymore. Next.js successfully compiles and listens to port 3000 as usual but I can't open the localhost in my browsers as if no local server is running.

image

Replies

0

This might be an issue with the OS you're using in WSL 2, try running another program and see if it works.

I've been using WSL 2 for a long time 🤔

1 reply
@dorklord23

Hi,

Thanks for the suggestion. As it turned out, I needed to restart the computer. It took two hours of me figuring out while the solution was so simple lol.

0

Okay. After further usage, I found out that if I turn on VPN (I use Avast), browser will not be able to open localhost. Weirdly enough, it only affects port that is used by Next.js. Port that is used by create-react-app can be open in browsers.

0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🎓
Help
2 participants
Beta
You can’t perform that action at this time.