Skip to content

Commit d4ca5a4

Browse files
committed
clean up npm docs and add Windows 10 instructions
1 parent 30dc47d commit d4ca5a4

File tree

2 files changed

+61
-20
lines changed

2 files changed

+61
-20
lines changed

docs/install.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,16 @@ _exact_ same commands presented in the rest of this document.
9999
We recommend installing with `yarn` or `npm` when:
100100

101101
1. You aren't using a machine with `amd64` or `arm64`.
102-
2. You're on Linux with `glibc` < v2.17, `glibcxx` < v3.4.18 on `amd64`, `glibc`
102+
1. You are installing code-server on Windows
103+
1. You're on Linux with `glibc` < v2.17, `glibcxx` < v3.4.18 on `amd64`, `glibc`
103104
< v2.23, or `glibcxx` < v3.4.21 on `arm64`.
104-
3. You're running Alpine Linux or are using a non-glibc libc. See
105+
1. You're running Alpine Linux or are using a non-glibc libc. See
105106
[#1430](https://github.com/cdr/code-server/issues/1430#issuecomment-629883198)
106107
for more information.
107108

108109
Installing code-server with `yarn` or `npm` builds native modules on install.
109-
This process requires C dependencies; see our guide on [installing these
110-
dependencies][./npm.md](./npm.md) for more information.
111110

112-
You must have Node.js v12 (or later) installed. See
113-
[#1633](https://github.com/cdr/code-server/issues/1633).
114-
115-
To install:
116-
117-
```bash
118-
yarn global add code-server
119-
# Or: npm install -g code-server
120-
code-server
121-
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
122-
```
111+
This process requires C dependencies; see our guide on [installing with yarn and npm][./npm.md](./npm.md) for more information.
123112

124113
## Standalone releases
125114

@@ -236,6 +225,11 @@ alternative](https://hub.docker.com/r/linuxserver/code-server).
236225

237226
You can install code-server via [Helm](https://github.com/cdr/code-server/blob/main/ci/helm-chart/README.md).
238227

228+
## Windows
229+
230+
We currently do not publish windows releases (see [#1397](https://github.com/cdr/code-server/issues/1397)). We recommend installing code-server onto Raspberry Pi with [`yarn` or
231+
`npm`](#yarn-npm).
232+
239233
## Raspberry Pi
240234

241235
We recommend installing code-server onto Raspberry Pi with [`yarn` or

docs/npm.md

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
22
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3-
# npm Install Requirements
3+
# yarn, npm
44

55
- [Node.js version](#nodejs-version)
66
- [Ubuntu, Debian](#ubuntu-debian)
@@ -35,6 +35,8 @@ sudo apt-get install -y \
3535
npm config set python python3
3636
```
3737

38+
Proceed to [installing](#installing)
39+
3840
## Fedora, CentOS, RHEL
3941

4042
```bash
@@ -44,27 +46,75 @@ sudo yum install -y python2
4446
npm config set python python2
4547
```
4648

49+
Proceed to [installing](#installing)
50+
4751
## Alpine
4852

4953
```bash
5054
apk add alpine-sdk bash libstdc++ libc6-compat
5155
npm config set python python3
5256
```
5357

58+
Proceed to [installing](#installing)
59+
5460
## macOS
5561

5662
```bash
5763
xcode-select --install
5864
```
5965

66+
Proceed to [installing](#installing)
67+
6068
## FreeBSD
6169

6270
```sh
6371
pkg install -y git python npm-node14 yarn-node14 pkgconf
6472
pkg install -y libinotify
6573
```
6674

67-
## Issues with Node.js after version upgrades
75+
Proceed to [installing](#installing)
76+
77+
## Windows
78+
79+
Installing code-server requires all of the [prerequisites for VS Code development](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites). When installing the C++ compiler tool chain, we recommend using "Option 2: Visual Studio 2019" for best results.
80+
81+
Next, install code-server with:
82+
83+
```bash
84+
yarn global add code-server
85+
# Or: npm install -g code-server
86+
code-server
87+
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
88+
```
89+
90+
A `postinstall.sh` script will attempt to run. Select your terminal (e.g git bash) as the default application for .sh files. If an additional dialog does not appear, run the install command again.
91+
92+
If the `code-server` command is not found, you'll need to [add a directory to your PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/). To find the directory, use the following commands:
93+
94+
```shell
95+
yarn global bin
96+
# Or: npm config get prefix
97+
```
98+
99+
For help and additional troubleshooting, see [#1397](https://github.com/cdr/code-server/issues/1397).
100+
101+
## Installing
102+
103+
After adding the dependencies for your OS, install code-server package globally:
104+
105+
```bash
106+
yarn global add code-server
107+
# Or: npm install -g code-server
108+
code-server
109+
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
110+
```
111+
112+
## Troubleshooting
113+
114+
If you need further assistance, post on our [GitHub Discussions
115+
page](https://github.com/cdr/code-server/discussions).
116+
117+
### Issues with Node.js after version upgrades
68118

69119
Occasionally, you may run into issues with Node.js.
70120

@@ -79,6 +129,3 @@ A step-by-step example of how you might do this is:
79129
2. Navigate into the directory: `cd /usr/local/Cellar/code-server/<version>/libexec/lib/vscode/`
80130
3. Recompile the native modules: `npm rebuild`
81131
4. Restart code-server
82-
83-
If you need further assistance, post on our [GitHub Discussions
84-
page](https://github.com/cdr/code-server/discussions).

0 commit comments

Comments
 (0)