Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ead5c68

Browse files
docs: remove references to installing with yarn in favor of npm
1 parent 101d4ee commit ead5c68

File tree

6 files changed

+37
-48
lines changed

6 files changed

+37
-48
lines changed

‎docs/CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Run your build:
141141

142142
```shell
143143
cd release
144-
yarn --production # Skip if you used KEEP_MODULES=1
144+
npm install --omit=dev # Skip if you used KEEP_MODULES=1
145145
# Runs the built JavaScript with Node.
146146
node .
147147
```

‎docs/android.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
1. Install UserLAnd from [Google Play](https://play.google.com/store/apps/details?id=tech.ula&hl=en_US&gl=US)
44
2. Install an Ubuntu VM
55
3. Start app
6-
4. Install Node.js, `curl`and `yarn` using `sudo apt install nodejs npm yarn curl -y`
6+
4. Install Node.jsand `curl` using `sudo apt install nodejs npm curl -y`
77
5. Install `nvm`:
88

99
```shell
@@ -18,6 +18,6 @@ nvm install 16
1818
nvm use 16
1919
```
2020

21-
8. Install code-server globally on device with: `npm i -g code-server`
21+
8. Install code-server globally on device with: `npm install --global code-server`
2222
9. Run code-server with `code-server`
2323
10. Access on localhost:8080 in your browser

‎docs/install.md‎

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- [install.sh](#installsh)
66
- [Detection reference](#detection-reference)
7-
- [yarn, npm](#yarn-npm)
7+
- [npm](#npm)
88
- [Standalone releases](#standalone-releases)
99
- [Debian, Ubuntu](#debian-ubuntu)
1010
- [Fedora, CentOS, RHEL, SUSE](#fedora-centos-rhel-suse)
@@ -20,7 +20,7 @@
2020
- [Uninstall](#uninstall)
2121
- [install.sh](#installsh-1)
2222
- [Homebrew](#homebrew)
23-
- [yarn, npm](#yarn-npm-1)
23+
- [npm](#npm-1)
2424
- [Debian, Ubuntu](#debian-ubuntu-1)
2525

2626
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -88,17 +88,16 @@ _exact_ same commands presented in the rest of this document.
8888

8989
- Ensure that you add `~/.local/bin` to your `$PATH` to run code-server.
9090

91-
- For FreeBSD, code-server will install the [npm package](#yarn-npm) with `yarn`
92-
or `npm`.
91+
- For FreeBSD, code-server will install the [npm package](#npm) with `npm`
9392

9493
- If you're installing code-server onto architecture with no releases,
95-
code-server will install the [npm package](#yarn-npm) with`yarn` or `npm`
94+
code-server will install the [npm package](#npm) with `npm`
9695
- We currently offer releases for amd64 and arm64.
97-
- The [npm package](#yarn-npm) builds the native modules on post-install.
96+
- The [npm package](#npm) builds the native modules on post-install.
9897

99-
## yarn, npm
98+
## npm
10099

101-
We recommend installing with `yarn` or `npm` when:
100+
We recommend installing with `npm` when:
102101

103102
1. You aren't using a machine with `amd64` or `arm64`.
104103
1. You are installing code-server on Windows
@@ -108,17 +107,17 @@ We recommend installing with `yarn` or `npm` when:
108107
[#1430](https://github.com/coder/code-server/issues/1430#issuecomment-629883198)
109108
for more information.
110109

111-
Installing code-server with `yarn` or `npm` builds native modules on install.
110+
Installing code-server with `npm` builds native modules on install.
112111

113-
This process requires C dependencies; see our guide on [installing with yarn and npm][./npm.md](./npm.md) for more information.
112+
This process requires C dependencies; see our guide on [installing with npm][./npm.md](./npm.md) for more information.
114113

115114
## Standalone releases
116115

117116
We publish self-contained `.tar.gz` archives for every release on
118117
[GitHub](https://github.com/coder/code-server/releases). The archives bundle the
119118
node binary and node modules.
120119

121-
We create the standalone releases using the [npm package](#yarn-npm), and we
120+
We create the standalone releases using the [npm package](#npm), and we
122121
then create the remaining releases using the standalone version.
123122

124123
The only requirement to use the standalone release is `glibc` >= 2.17 and
@@ -152,7 +151,7 @@ code-server
152151
## Debian, Ubuntu
153152

154153
> The standalone arm64 .deb does not support Ubuntu 16.04 or earlier. Please
155-
> upgrade or [build with yarn](#yarn-npm).
154+
> upgrade or [build with npm](#npm).
156155
157156
```bash
158157
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb
@@ -164,7 +163,7 @@ sudo systemctl enable --now code-server@$USER
164163
## Fedora, CentOS, RHEL, SUSE
165164

166165
> The standalone arm64 .rpm does not support CentOS 7. Please upgrade or [build
167-
> with yarn](#yarn-npm).
166+
> with npm](#npm).
168167
169168
```bash
170169
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-amd64.rpm
@@ -295,14 +294,13 @@ You can install code-server using the [Helm package manager](https://coder.com/d
295294

296295
## Windows
297296

298-
We currently [do not publish Windows releases](https://github.com/coder/code-server/issues/1397). We recommend installing code-server onto Windows with [`yarn` or `npm`](#yarn-npm).
297+
We currently [do not publish Windows releases](https://github.com/coder/code-server/issues/1397). We recommend installing code-server onto Windows with [`npm`](#npm).
299298

300299
> Note: You will also need to [build coder/cloud-agent manually](https://github.com/coder/cloud-agent/issues/17) if you would like to use `code-server --link` on Windows.
301300
302301
## Raspberry Pi
303302

304-
We recommend installing code-server onto Raspberry Pi with [`yarn` or
305-
`npm`](#yarn-npm).
303+
We recommend installing code-server onto Raspberry Pi with [`npm`](#npm).
306304

307305
If you see an error related to `node-gyp` during installation, See [#5174](https://github.com/coder/code-server/issues/5174) for more information.
308306

@@ -346,18 +344,12 @@ brew remove code-server
346344
brew uninstall code-server
347345
```
348346

349-
### yarn, npm
347+
### npm
350348

351349
To remove the code-server global module, run:
352350

353351
```shell
354-
yarn global remove code-server
355-
```
356-
357-
or
358-
359-
```shell
360-
npm uninstall -g code-server
352+
npm uninstall --global code-server
361353
```
362354

363355
### Debian, Ubuntu

‎docs/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"children": [
2222
{
2323
"title": "npm",
24-
"description": "How to install code-server using npm or yarn",
24+
"description": "How to install code-server using npm",
2525
"path": "./npm.md"
2626
},
2727
{

‎docs/npm.md‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ If you're installing code-server via `npm`, you'll need to install additional
2020
dependencies required to build the native modules used by VS Code. This article
2121
includes installing instructions based on your operating system.
2222

23+
> **WARNING**: Do not use `yarn` to install code-server. Unlike `npm`, it does not respect
24+
> lockfiles for distributed applications. It will instead use the latest version
25+
> available at installation time - which might not be the one used for a given
26+
> code-server release, and [might lead to unexpected behavior](https://github.com/coder/code-server/issues/4927).
27+
2328
## Node.js version
2429

2530
We use the same major version of Node.js shipped with Code's remote, which is
@@ -72,7 +77,7 @@ Proceed to [installing](#installing)
7277
## FreeBSD
7378

7479
```sh
75-
pkg install -y git python npm-node16 yarn-node16 pkgconf
80+
pkg install -y git python npm-node16 pkgconf
7681
pkg install -y libinotify
7782
```
7883

@@ -85,8 +90,7 @@ Installing code-server requires all of the [prerequisites for VS Code developmen
8590
Next, install code-server with:
8691

8792
```bash
88-
yarn global add code-server
89-
# Or: npm install -g code-server
93+
npm install --global code-server
9094
code-server
9195
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
9296
```
@@ -96,8 +100,7 @@ A `postinstall.sh` script will attempt to run. Select your terminal (e.g., Git b
96100
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 command:
97101

98102
```shell
99-
yarn global bin
100-
# Or: npm config get prefix
103+
npm config get prefix
101104
```
102105

103106
For help and additional troubleshooting, see [#1397](https://github.com/coder/code-server/issues/1397).
@@ -107,8 +110,7 @@ For help and additional troubleshooting, see [#1397](https://github.com/coder/co
107110
After adding the dependencies for your OS, install the code-server package globally:
108111

109112
```bash
110-
yarn global add code-server
111-
# Or: npm install -g code-server
113+
npm install --global code-server
112114
code-server
113115
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
114116
```
@@ -122,7 +124,7 @@ page](https://github.com/coder/code-server/discussions).
122124

123125
Occasionally, you may run into issues with Node.js.
124126

125-
If you install code-server using `yarn` or `npm`, and you upgrade your Node.js
127+
If you install code-server using `npm`, and you upgrade your Node.js
126128
version, you may need to reinstall code-server to recompile native modules.
127129
Sometimes, you can get around this by navigating into code-server's `lib/vscode`
128130
directory and running `npm rebuild` to recompile the modules.
@@ -136,12 +138,12 @@ A step-by-step example of how you might do this is:
136138

137139
### Debugging install issues with npm
138140

139-
`yarn` suppresses logs when running `yarn global add`, so to debug installation issues, install with `npm` instead:
141+
To debug installation issues, install with `npm`:
140142

141143
```shell
142144
# Uninstall
143-
npm uninstall -g --unsafe-perm code-server > /dev/null 2>&1
145+
npm uninstall --global --unsafe-perm code-server > /dev/null 2>&1
144146

145147
# Install with logging
146-
npm install --loglevel verbose -g --unsafe-perm code-server
148+
npm install --loglevel verbose --global --unsafe-perm code-server
147149
```

‎docs/termux.md‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Termux
44

55
- [Install](#install)
6-
- [Yarn Installation](#yarn-installation)
6+
- [NPM Installation](#npm-installation)
77
- [Upgrade](#upgrade)
88
- [Known Issues](#known-issues)
99
- [Git won't work in `/sdcard`](#git-wont-work-in-sdcard)
@@ -66,7 +66,7 @@ curl -fsSL https://code-server.dev/install.sh | sh
6666
> Consider using a new user instead of root, read [here](https://www.howtogeek.com/124950/htg-explains-why-you-shouldnt-log-into-your-linux-system-as-root/) why using root is not recommended.\
6767
> Learn how to add a user [here](#create-a-new-user).
6868
69-
## Yarn Installation
69+
## NPM Installation
7070

7171
1. Get [Termux](https://f-droid.org/en/packages/com.termux/) from **F-Droid**.
7272

@@ -93,19 +93,14 @@ pkg install -y \
9393
binutils \
9494
pkg-config \
9595
python3 \
96-
yarn \
9796
nodejs-lts
9897
npm config set python python3
9998
node -v
10099
```
101100

102101
you will get node version `v16.15.0`
103102

104-
5. Now install code-server
105-
106-
```sh
107-
yarn global add code-server
108-
```
103+
5. Now install code-server following our guide on [installing with npm][./npm.md](./npm.md)
109104

110105
6. Congratulation code-server is installed on your device using the following command.
111106

@@ -116,7 +111,7 @@ code-server --auth none
116111
7. If already installed then use the following command for upgradation.
117112

118113
```
119-
yarn upgrade code-server
114+
npm update --global code-server
120115
```
121116

122117
## Upgrade

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /