Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Go Live" is no displayed. #160

Closed
ghost opened this issue Jun 17, 2018 · 35 comments
Closed

"Go Live" is no displayed. #160

ghost opened this issue Jun 17, 2018 · 35 comments

Comments

@ghost
Copy link

ghost commented Jun 17, 2018

"Go Live" is no displayed.
Since it was displayed until a few days ago, was there any change in version upgrade?

The "Open with Live Server" command displays an entry field but has no guidance as to what to enter.

live server version 5.0.0

@rjoydip-zz
Copy link
Collaborator

@tori-333 No, there is no change in commands/keybindings/menus. Can you check your console? Is there any error?

@ghost
Copy link
Author

ghost commented Jun 17, 2018

Entering the "http://localhost:5050/" in the "Open with Live Server" command will cause a long error on the development tool's console.
I guess this is only because I do not understand how to use this command.

console.ts:136 [Extension Host] WARNING: Promise with no error callback:5
log.ts:171 ERR Cannot read property 'uri' of undefined: TypeError: Cannot read property 'uri' of undefined
at setOrChangeWorkspace.then.workspaceName (C:\Users\USERNAME.vscode\extensions\ritwickdey.liveserver-5.0.0\out\src\workspaceResolver.js:46:86)
at Object.g [as _notify] (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:76:971)
...
I will skip it because it is so long.

I do not know the reason why the "Go Live" button is not displayed.
It is displayed automatically while editing HTML files, right?

Sorry, Because I do not understand English, this sentence was translated by Goole.

@ritwickdey
Copy link
Owner

What is the your vscode version?

@ghost
Copy link
Author

ghost commented Jun 17, 2018

VSCode version is 1.24.0

@ritwickdey
Copy link
Owner

Please give a screenshot of your Vscode workspace.

@ghost
Copy link
Author

ghost commented Jun 17, 2018

I'm not change settings.
https://i.imgur.com/4bxh35I.png

@ritwickdey
Copy link
Owner

Strange! This is part of vscode api, it should not be null.

Anyway, I'need more info.

  1. Is this multi-root workspace?
  2. Please try a command (ctr+shift+p), 'Live Server: Change live server workspace'. Share a screenshot with us.
  3. Have you tried to reinstall vscode?

@ghost
Copy link
Author

ghost commented Jun 17, 2018

  1. Normal workspace.
    Even when opening a single HTML file, the "Go Live" button did not appear.

  2. What is this place to enter?
    https://i.imgur.com/MhfGhcZ.png

  3. No.

I am thinking of giving up.

@ritwickdey
Copy link
Owner

Yaa, I was right. This line is null.

const { workspaceFolders } = workspace;
const workspaceNames = workspaceFolders.map(e => e.name);

But this is the part of vscode api, how it could be null...!! Really Strange issue.

Can you show me a screenshot of explorer (ctrl+shift+E) window of vscode?

@rjoydip-zz
Copy link
Collaborator

rjoydip-zz commented Jun 17, 2018

@ritwickdey I think null is producing from here.

if (targetWorkspace)
return resolve(targetWorkspace.uri.fsPath);
// reset whatever user is set.
Config.setMutiRootWorkspaceName(null);

@ghost
Copy link
Author

ghost commented Jun 17, 2018

"Go Live" button was displayed!

When you display explorer with Ctrl + Sfhit + E and add folder, "Go Live" button is displayed!

It seems to be a problem that no folder was registered in my workspace.

The problem was solved. Thank you.

@ritwickdey
Copy link
Owner

ritwickdey commented Jun 17, 2018

@rjoydip, but why? Config.setMutiRootWorkspaceName(null); is just resetting the user settings. & I said @tori-333 to try Live Server: Change live server workspace command. This command is triggering this function.

export function setOrChangeWorkspace() {
const { workspaceFolders } = workspace;
const workspaceNames = workspaceFolders.map(e => e.name);
return window.showQuickPick(workspaceNames, {
placeHolder: 'choose workspace for Live Server',
ignoreFocusOut: true
}).then(workspaceName => {
if (workspaceName) {
return Config.setMutiRootWorkspaceName(workspaceName).then(() => workspaceName);
}
});
}

This is null.

@ritwickdey
Copy link
Owner

Hi @tori-333 , Great. just for a asking, what doing mean by "It seems to be a problem that no folder was registered in my workspace.". What you did?

@ghost
Copy link
Author

ghost commented Jun 17, 2018

Sorry. I English very bad.

The folder did not exist in the workspace.

https://i.imgur.com/JaCXer2.png

@rjoydip-zz
Copy link
Collaborator

@ritwickdey Give a checking that whether workshop has any folder then apply map.

@ritwickdey
Copy link
Owner

yaa! it's one of the edge cases. Ok. Live Server will prompt an error msg from next update.

@ritwickdey
Copy link
Owner

ritwickdey commented Jun 17, 2018

Hi @tori-333, Can you tell me what is written in explorer window (last screenshot) of vscode. (after the keyword "JS-COLLAGE" and below of it)

@ghost
Copy link
Author

ghost commented Jun 17, 2018

JS-Collage(ワークスペース)
JS-Collage(Work Space)

まだフォルダーをワークスペースに追加していません。
You have not added the folder to the workspace yet.

フォルダーの追加
Add folder

It's OK?

ritwickdey added a commit that referenced this issue Jun 17, 2018
@Isabellle
Copy link

Sometimes, relaunch vscode could fix the issue. Don't know why but it worked.

@ghost
Copy link

ghost commented Feb 12, 2019

my vscode not lunching

@ghost
Copy link

ghost commented Feb 12, 2019

i mean after installing the live server.
its says "Open a folder or workspace... (File -> Open Folder)"

@apolopena
Copy link

I just got the issue by simply opening a saved workspace file that had no folder added. I had to add the same folder that the workspace file was in was in to get the Live Server button to appear.

@viicktur
Copy link

here is the display message of my VS code
Extension host terminated unexpectedly.

@corrysalim
Copy link

JS-Collage(ワークスペース)
JS-Collage(Work Space)

まだフォルダーをワークスペースに追加していません。
You have not added the folder to the workspace yet.

フォルダーの追加
Add folder

It's OK?

Thanks a lot 🙏🏻

@omrajsharma
Copy link

I am very begginer with vs code. Please can anyone ecplain in more elaborated form. this would be a great help.

@ghost
Copy link

ghost commented May 19, 2020 via email

@ghost
Copy link

ghost commented May 19, 2020 via email

@phemmyjunior
Copy link

I had my go live button displayed before I upgraded my visual studio code and since then my go live button disappeared, I've uninstalled and re installed the live server more than 10 times and still nothing is working,pls I need help asap

@ghost
Copy link

ghost commented May 21, 2020 via email

@phemmyjunior
Copy link

No it's not there even when I clicked open with live server,nothing happened

@vikramvi
Copy link

Sorry. I English very bad.

The folder did not exist in the workspace.

https://i.imgur.com/JaCXer2.png

What's difference between workspace and folder in VSCode ?

@aishmash1010
Copy link

I was facing the same issue, I installed live server extension , which was not present and it worked.

@Galmic
Copy link

Galmic commented Feb 11, 2021

I'm also new here and had the same issue, Here's how i solve this issue.
File >> Open Folder

Then select the folder that your working on. and then you can now see the Go Live button at the bottom.

Hope this helps.

@sayan2202
Copy link

when i click on live server ,then this is not working

@Patoski-patoski
Copy link

I installed Live Server but it's not running, It does not display "Go live " on the taskbar.
I cannot even run Live Server even when I right clicked.

P.S other live Preview worked except live Server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests