Saturday, December 28, 2019

vs code server on WSL

Upgrade nodejs to v12
$ sudo apt update
$ sudo apt install nodejs nodejs-dev libssl1.0-dev
$ sudo apt install npm
$ node -v
v8.10.0
$ sudo npm cache clean -f
$ sudo npm install -g n
$ sudo n stable
$ sudo apt purge nodejs
$ sudo apt autoremove
$ exit
$ node -v
v12.14.0

Install Yarn
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt update
$ sudo apt install yarn

Two more packages needed
$ sudo apt install libxkbfile-dev libsecret-1-dev

https://github.com/cdr/code-server

$ git clone https://github.com/microsoft/vscode
$ cd vscode
$ git checkout ${vscodeVersion} # 1.41.0 for now. See travis.yml for the version to use.
$ yarn
$ git clone https://github.com/cdr/code-server src/vs/server
$ cd src/vs/server
$ yarn
$ yarn patch:apply
$ yarn watch
# Wait for the initial compilation to complete (it will say "Finished compilation").
# Run the next command in another shell.
$ yarn start
# Visit http://localhost:8080