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)