code-server: error Please specify at least one file or folder

I had code-server installed and it worked already, but now i got this error [2021-03-06T13:02:10.023Z] error Please specify at least one file or folder and I have no idea how to solve it. Maybe someone else had the same problem and knows how to solve it.

OS: PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)” NAME=“Raspbian GNU/Linux” VERSION_ID=“10” VERSION=“10 (buster)” VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian

yarn version v1.22.5

code-server: version: 3.9.0

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27 (11 by maintainers)

Most upvoted comments

I think for some specific scenario it is still necessary to do VSCode -> Remote-SSH -> code-server?
E.g. one might want to setup code-server for iPad, he/she may use VSCode Remote-SSH on a window desktop and do the setup work.

And looks like “sudo code-server” works for my case.

That’s interesting, I also meet this question when i use VSCode Remote-SSH to init code-server. It’s not serious but confused. Thanks for your issue and I will use the openssh in CMD to init code-server.

Because im not allways able to use VSCode if im not home and if i try something with code-server at home, I allways try to start the server with the builtin Terminal of VSCode and not with 3rd-party programms like Putty.

Thats why. I found the bug by accident, when i tried to change some configs of code-server and looked if i could run them like they are and also if they would work.

Most of it is right but all my code is not on my PC but on my Pi, which I access over SSH from my PC.

     ,-->Where my Code is

PC–Pi–code-server–(Internet)–other-maschine

That is more how it is.

Sorry I meant to say VSCODE_IPC_HOOK_CLI= ~/.yarn/bin/code-server

It seems like you have code-server installed globally with yarn so you could also just run VSCODE_IPC_HOOK_CLI= code-server

Reproduction Steps

Does this look right to you?

  1. Open VSCode on desktop
  2. Use the “Remote - SSH” extension to SSH into code-server host environment (where code-server is installed)
  3. Open a terminal and run ~/.yarn/bin/code-server

Expected

code-server should start running on host machine

Actual

error Please specify at least one file or folder

That is what i meant. Sorry if I didnt explain it correctly.

VSC = Visual Studio Code

I open VSC, connect VSC with the “Remote - SSH” extension over SSH with my pi and open a terminal, there i enter ~/.yarn/bin/code-server

On my phone I open the App RaspController, there I open the SSH-Shell and enter ~/.yarn/bin/code-server

On my phone does it work On my PC it doesnt work

Sure, a lot. Funny is, if i ssh into my Pi with my phone it works but if I try the same on my PC it gives me this error