Vscode-live-server: "Open a folder or workspace... (File -> Open Folder)" when "> Live Server: Open with Live Server" without a folder being open

Created on 5 Dec 2018  Â·  49Comments  Â·  Source: ritwickdey/vscode-live-server

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[X ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[X ] Feature request
[ X] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

With a HTML page open, I hit Ctrl+Shift+P and type Live Server: Open with Live Server but I get a error saying Open a folder or workspace... (File -> Open Folder)

Expected behavior

Should open a standalone HTML file.

Environment

Browser: 

- [ ] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [X ] IE version 11
- [ ] Edge version XX

For Tooling issues:

- Live Server: Latest 
- Platform: Windows
- Visual Studio Code: 1.29.1

Others

Most helpful comment

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

All 49 comments

Hi I was just wondering if you were able to solve this issue? I am experiences the same error.

Guys hello, i have the same problem but i could not solve it.
When i press Open with live server below message appears "Open a folder or workspace... (File -> Open Folder)", I opened any html file there many times but nothing about live server works ,guys how can i solve this?please any help
Kind Regards

hi

Want to known how to open more than one html file using live server in visual studio code
And when i try open more than one file with live server it is opening that files on same port, but when try to close live server for one file it is closing for all files opened on that port
So please tell me how to use live server for multiple files in visual studio code

I'm facing the same issue can anybody help me please!
"Open a folder or workspace... (File -> Open Folder)"

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

Didn't work for me :(

it worked, thank you!

@Pihu01 it worked

it really works...............

Will you please attach screenshot or write your issue which you are facing?
It will help me to understand related problem

On Tue, 10 Sep 2019, 8:32 pm Vishal Singh Rana, notifications@github.com
wrote:

@Pihu01 https://github.com/Pihu01 could you please elaborate it little
more. It didn't work for me.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ritwickdey/vscode-live-server/issues/248?email_source=notifications&email_token=ALH7SKIIUCFJPZVORQIQA7TQI6ZITA5CNFSM4GIMBGXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6LNHLI#issuecomment-529978285,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALH7SKMXXULSEWBJVIJL253QI6ZITANCNFSM4GIMBGXA
.

Thanks, but It worked with the help of your previous answer.

Didn't work for me :(

Try doing "ctrl O" and then open the file. This will solve it. You might have seen "Not Opened In Folder" notification

It worked!

go to file>open folder> then open the folder where .html file is saved dont open the file just open the folder

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

sry but i cant understand please can you helped me to solved this prob.......

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

thankyou pihu01 its working ..........
thanks alot....

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[X ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[X ] Feature request
[ X] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

With a HTML page open, I hit Ctrl+Shift+P and type Live Server: Open with Live Server but I get a error saying Open a folder or workspace... (File -> Open Folder)

Expected behavior

Should open a standalone HTML file.

Environment

Browser: 

- [ ] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [X ] IE version 11
- [ ] Edge version XX

For Tooling issues:

- Live Server: Latest 
- Platform: Windows
- Visual Studio Code: 1.29.1

Others

Open your folder in Vscode explorer

the same question occured,can anybody help me figure it out ? 3q

Vscode>File>Open folder >"choose the folder where you saved .html file.

then click on "alt+alt+o" to start live server.
i can make a short video if you cant understand me.

yep,i understand,i had try to find out folder,but it doesn't work finally.I am so much appreciated if you could send me the video.

thanks it worked!!

I'm facing the same issue can anybody help me please!
"Open a folder or workspace... (File -> Open Folder)"

where are the solutions??

Hi, I am facing the same issue. I tried opening in the folder location, and the folder in VS code explorer, it didn't work. Can anyone help me out? Thanks in advance.

What a pity btw,i don't know how to solve out the problem either.i am so soory for that,i am considering to download another editor such as Hbuilder replacing of vscode and let it go as for liverserver

Best Regards,
Allen

------------------ åŽŸå§‹é‚®ä»¶ ------------------
发件人: "arvinmi"<[email protected]>;
发送时闎: 2020幎5月25日(星期䞀) 䞋午2:20
收件人: "ritwickdey/vscode-live-server"<[email protected]>;
抄送: "Allen"<[email protected]>;"Comment"<[email protected]>;
䞻题: Re: [ritwickdey/vscode-live-server] "Open a folder or workspace... (File -> Open Folder)" when "> Live Server: Open with Live Server" without a folder being open (#248)

Hi, I am facing the same issue. I tried opening in the folder location, and the folder in VS code explorer, it didn't work. Can anyone help me out? Thanks in advance.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

I cant believe that worked :D

i had try,but the error existed all the time.Do you have other solutions to aviod it?

Thank you so much~

Best Regards,
Allen

------------------ åŽŸå§‹é‚®ä»¶ ------------------
发件人: "HackerPractice"<[email protected]>;
发送时闎: 2020幎5月31日(星期倩) 晚䞊8:57
收件人: "ritwickdey/vscode-live-server"<[email protected]>;
抄送: "Allen"<[email protected]>; "Comment"<[email protected]>;
䞻题: Re: [ritwickdey/vscode-live-server] "Open a folder or workspace... (File -> Open Folder)" when "> Live Server: Open with Live Server" without a folder being open (#248)

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

I cant believe that worked :D

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

thank you maam
it really works

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

thank you, it worked for me

thanks for your reminding,i am trying to do so but it doesn't work at present,could you show me the pictures what you operate on?

thank you so much for your support.

Best Regards,
Allen

------------------ åŽŸå§‹é‚®ä»¶ ------------------
发件人: "shahnaeem"<[email protected]>;
发送时闎: 2020幎6月22日(星期䞀) 凌晚5:28
收件人: "ritwickdey/vscode-live-server"<[email protected]>;
抄送: "Allen"<[email protected]>; "Comment"<[email protected]>;
䞻题: Re: [ritwickdey/vscode-live-server] "Open a folder or workspace... (File -> Open Folder)" when "> Live Server: Open with Live Server" without a folder being open (#248)

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

thank you, it worked for me

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

Its not working

Its working :-)
At first you should open folder not only open file...

Try to open the FOLDER that contains the document you are trying to see with live server. I did that and the problem was solved.

PD: Even if you have the document opened, you might not have the folder opened, and that could be caussing the problem. At least, that was what happend in my case.

Greetings!

Server is started at 5500 but failed to open in Browser Preview. Thats the error that shows when I try this method

Try to open the FOLDER that contains the document you are trying to see with live server. I did that and the problem was solved.

PD: Even if you have the document opened, you might not have the folder opened, and that could be caussing the problem. At least, that was what happend in my case.

Greetings!

A new error just popped out when I tried this method. "Server is started at 5500 but failed to open in Browser Preview."

Could you help me?

Hi,

When you try opening the live server and it throws an error saying "Open a folder or workspace... (File -> Open Folder)" then,
On vscode to the top left corner --> Go to file-- >click on open folder and select the folder in which the source code is saved.
This should resolve the issue.

go to file>open folder> then open the folder where .html file is saved dont open the file just open the folder
Yes, that is the solution

Thankyou it's working

many thanks for the solution after 5 hours research....

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

it worked! Thank you!

Wow! I got the solution,
whenever you try to open the file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exists) in visual studio code, and then you can open live server by right click.
thank you

It's working thanks learner

well we should thanks to 'Pihu01' up there

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

It worked for me ...thanks for posting

right click on UNTITLED (WORKSPACE) and select ADD FOLDER TO WORKSPACE
select the folder you wan to add and continue working.
Annotation 2020-11-21 095644
Annotation 2020-11-21 095634

you can also click on FILE and select ADD FOLDER TO WORKSPACE. then select the complete folder of your code.
Uploading {06AE5C49-1343-474D-AA51-6521DCFA1472}.png.jpg


Guyz.... its not working because you might have selected "open file" option to put your file in VS Code, instead try to select "open folder" option in VS Code and it will surely gonna work. 👍 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯

For Apple users,
hi guys what worked for me it was, when i went to open the folder the system just took me right to the folder, i clicked out of there like were the folder is, then i went to the folder then the file, if the bottom line turns blue in vscode that means it worked. let me know please.

you can also click on FILE and select ADD FOLDER TO WORKSPACE. then select the complete folder of your code.

Exactly make sure all the folders you have your files in are saved in a "WORKSPACE FOLDER". Put all your files in the Workspace Folder, then open the files from your workspace folder by using VSCODE to open it.

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

thanx that really helped

I got a solution
open vs code
then click on files then click on open folder, select the folder where your html file is.
then click on right click open with server.
it will work

Wow! I got the solution,
whenever you try to open file without opening folder in visual studio code, then the issue occurs, to avoid this first open the folder(where code file already exist) in visual studio code, and then you can open live server by right click.
thank you

Thank you! I did it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Missangay picture Missangay  Â·  7Comments

js76155 picture js76155  Â·  4Comments

tehsy97 picture tehsy97  Â·  6Comments

Stonerea656 picture Stonerea656  Â·  5Comments

Zerotask picture Zerotask  Â·  4Comments