DEV Community

Pere Sola
Pere Sola

Posted on

Fix Cannot GET using VSCode Live Server extension

  • I was recently working on a vanilla JS project and doing a vanilla JS client router. I was developing it using the VSCode Live Server extension. When in a given route i.e. /order and refreshing the browser page I was getting the Cannot GET /order.
  • I am not sure I would do a good job explaining why this happens (this SO answer does it). But I know how to fix it!
  • Head to the vscode extension settings and set index.html under the Live Server > Settings: File. It will start working.

Live server file setting in vscode

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay