-4

Image of my code.

I'm working on a five-page website and just this morning, I tried to access live previews of my file, but when I tried, it says, command 'livePreview.start.preview.atFile' not found. I'm not sure what happened but I'd be grateful for any suggestions.

I looked up solutions to my problem, but I'm a newbie at coding so I don't really understand what I am meant to do. I've never encountered this problem before.

I created a new HTML file and c+p my existing code into the new file, and nothing happened. It didn't fix the problem. I didn't really expect it solve my problem, but I really have no idea how this happened because it was working perfectly fine yesterday afternoon, so I'm not really sure what went wrong.

1
  • UPDATE: Sorry really late response but thank you all for your helpful replies! I followed what @Jaideep Tiwari said and it fixed my problem! Thank you once again! Commented Oct 8, 2023 at 17:31

6 Answers 6

2

Try installing other version of live preview which is six months or older. It worked for me.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

1

I was having the same issue from the start of installing Live Preview. Updating VScode seemed to have fix the issue. You may need to update the VScode application:

  • Click the little gear icon found at the bottom of the left side bar (the "Manage" button, under the profile icon).
  • There, you may notice a VScode update is available because you'll have an option that reads "Restart to Update" (otherwise it may read "Check for updates...").

This will completely restart the program and update the program.

  • I then clicked on the Extensions button (icon with blocks) in that left bar.
  • Under "Installed" I found the Live Preview extension and saw "Reload required" for the extension. I clicked on that little alert and it refreshed it.

What DIDN'T work for me:

  1. Simply closing and reopening the VScode program.
  2. Switching to a pre-release version of Live Preview.

Comments

0

Live preview is an excellent extension for viewing a website built in VS Code. You can click on the extension tab and search for it. To launch your website, you can right click on your HTML file and start the live server. You must start it from the HTML file or it will not work.

If you have already installed something like this, then be sure to check that your extension is installed and working correctly.

Comments

0

I installed Live Preview today and was not able to start it with the same error message: command 'livePreview.start.preview.atFile' not found

After installing a pending VSCode update (and the required editor restart), I could finally run the preview.

It did not help to change the port, to install the pre-release version, or restart the editor.

Comments

0

I had the same issue just now.

I fixed it by disabling the add-on, then restarting it and re-enabling it.

And now it works again.

Comments

0

Use Phoenix code, it has built in live preview
https://phcode.dev/
https://phcode.io/

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.