mirror of https://github.com/coder/code-server.git
docs: remove references to installing with yarn in favor of npm (#5518)
This commit is contained in:
parent
6262c7a0bf
commit
ef3f4e82b2
|
@ -141,7 +141,7 @@ Run your build:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd release
|
cd release
|
||||||
yarn --production # Skip if you used KEEP_MODULES=1
|
npm install --omit=dev # Skip if you used KEEP_MODULES=1
|
||||||
# Runs the built JavaScript with Node.
|
# Runs the built JavaScript with Node.
|
||||||
node .
|
node .
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
1. Install UserLAnd from [Google Play](https://play.google.com/store/apps/details?id=tech.ula&hl=en_US&gl=US)
|
1. Install UserLAnd from [Google Play](https://play.google.com/store/apps/details?id=tech.ula&hl=en_US&gl=US)
|
||||||
2. Install an Ubuntu VM
|
2. Install an Ubuntu VM
|
||||||
3. Start app
|
3. Start app
|
||||||
4. Install Node.js, `curl` and `yarn` using `sudo apt install nodejs npm yarn curl -y`
|
4. Install Node.js and `curl` using `sudo apt install nodejs npm curl -y`
|
||||||
5. Install `nvm`:
|
5. Install `nvm`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@ -18,6 +18,6 @@ nvm install 16
|
||||||
nvm use 16
|
nvm use 16
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Install code-server globally on device with: `npm i -g code-server`
|
8. Install code-server globally on device with: `npm install --global code-server --unsafe-perm`
|
||||||
9. Run code-server with `code-server`
|
9. Run code-server with `code-server`
|
||||||
10. Access on localhost:8080 in your browser
|
10. Access on localhost:8080 in your browser
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
- [install.sh](#installsh)
|
- [install.sh](#installsh)
|
||||||
- [Detection reference](#detection-reference)
|
- [Detection reference](#detection-reference)
|
||||||
- [yarn, npm](#yarn-npm)
|
- [npm](#npm)
|
||||||
- [Standalone releases](#standalone-releases)
|
- [Standalone releases](#standalone-releases)
|
||||||
- [Debian, Ubuntu](#debian-ubuntu)
|
- [Debian, Ubuntu](#debian-ubuntu)
|
||||||
- [Fedora, CentOS, RHEL, SUSE](#fedora-centos-rhel-suse)
|
- [Fedora, CentOS, RHEL, SUSE](#fedora-centos-rhel-suse)
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
- [Uninstall](#uninstall)
|
- [Uninstall](#uninstall)
|
||||||
- [install.sh](#installsh-1)
|
- [install.sh](#installsh-1)
|
||||||
- [Homebrew](#homebrew)
|
- [Homebrew](#homebrew)
|
||||||
- [yarn, npm](#yarn-npm-1)
|
- [npm](#npm-1)
|
||||||
- [Debian, Ubuntu](#debian-ubuntu-1)
|
- [Debian, Ubuntu](#debian-ubuntu-1)
|
||||||
|
|
||||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
<!-- 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.
|
||||||
|
|
||||||
- Ensure that you add `~/.local/bin` to your `$PATH` to run code-server.
|
- Ensure that you add `~/.local/bin` to your `$PATH` to run code-server.
|
||||||
|
|
||||||
- For FreeBSD, code-server will install the [npm package](#yarn-npm) with `yarn`
|
- For FreeBSD, code-server will install the [npm package](#npm) with `npm`
|
||||||
or `npm`.
|
|
||||||
|
|
||||||
- If you're installing code-server onto architecture with no releases,
|
- If you're installing code-server onto architecture with no releases,
|
||||||
code-server will install the [npm package](#yarn-npm) with `yarn` or `npm`
|
code-server will install the [npm package](#npm) with `npm`
|
||||||
- We currently offer releases for amd64 and arm64.
|
- We currently offer releases for amd64 and arm64.
|
||||||
- The [npm package](#yarn-npm) builds the native modules on post-install.
|
- The [npm package](#npm) builds the native modules on post-install.
|
||||||
|
|
||||||
## yarn, npm
|
## npm
|
||||||
|
|
||||||
We recommend installing with `yarn` or `npm` when:
|
We recommend installing with `npm` when:
|
||||||
|
|
||||||
1. You aren't using a machine with `amd64` or `arm64`.
|
1. You aren't using a machine with `amd64` or `arm64`.
|
||||||
1. You are installing code-server on Windows
|
1. You are installing code-server on Windows
|
||||||
|
@ -108,9 +107,9 @@ We recommend installing with `yarn` or `npm` when:
|
||||||
[#1430](https://github.com/coder/code-server/issues/1430#issuecomment-629883198)
|
[#1430](https://github.com/coder/code-server/issues/1430#issuecomment-629883198)
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
Installing code-server with `yarn` or `npm` builds native modules on install.
|
Installing code-server with `npm` builds native modules on install.
|
||||||
|
|
||||||
This process requires C dependencies; see our guide on [installing with yarn and npm][./npm.md](./npm.md) for more information.
|
This process requires C dependencies; see our guide on [installing with npm][./npm.md](./npm.md) for more information.
|
||||||
|
|
||||||
## Standalone releases
|
## Standalone releases
|
||||||
|
|
||||||
|
@ -118,7 +117,7 @@ We publish self-contained `.tar.gz` archives for every release on
|
||||||
[GitHub](https://github.com/coder/code-server/releases). The archives bundle the
|
[GitHub](https://github.com/coder/code-server/releases). The archives bundle the
|
||||||
node binary and node modules.
|
node binary and node modules.
|
||||||
|
|
||||||
We create the standalone releases using the [npm package](#yarn-npm), and we
|
We create the standalone releases using the [npm package](#npm), and we
|
||||||
then create the remaining releases using the standalone version.
|
then create the remaining releases using the standalone version.
|
||||||
|
|
||||||
The only requirement to use the standalone release is `glibc` >= 2.17 and
|
The only requirement to use the standalone release is `glibc` >= 2.17 and
|
||||||
|
@ -152,7 +151,7 @@ code-server
|
||||||
## Debian, Ubuntu
|
## Debian, Ubuntu
|
||||||
|
|
||||||
> The standalone arm64 .deb does not support Ubuntu 16.04 or earlier. Please
|
> The standalone arm64 .deb does not support Ubuntu 16.04 or earlier. Please
|
||||||
> upgrade or [build with yarn](#yarn-npm).
|
> upgrade or [build with npm](#npm).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb
|
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
|
||||||
## Fedora, CentOS, RHEL, SUSE
|
## Fedora, CentOS, RHEL, SUSE
|
||||||
|
|
||||||
> The standalone arm64 .rpm does not support CentOS 7. Please upgrade or [build
|
> The standalone arm64 .rpm does not support CentOS 7. Please upgrade or [build
|
||||||
> with yarn](#yarn-npm).
|
> with npm](#npm).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-amd64.rpm
|
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
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
> 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.
|
> 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.
|
||||||
|
|
||||||
## Raspberry Pi
|
## Raspberry Pi
|
||||||
|
|
||||||
We recommend installing code-server onto Raspberry Pi with [`yarn` or
|
We recommend installing code-server onto Raspberry Pi with [`npm`](#npm).
|
||||||
`npm`](#yarn-npm).
|
|
||||||
|
|
||||||
If you see an error related to `node-gyp` during installation, See [#5174](https://github.com/coder/code-server/issues/5174) for more information.
|
If you see an error related to `node-gyp` during installation, See [#5174](https://github.com/coder/code-server/issues/5174) for more information.
|
||||||
|
|
||||||
|
@ -346,18 +344,12 @@ brew remove code-server
|
||||||
brew uninstall code-server
|
brew uninstall code-server
|
||||||
```
|
```
|
||||||
|
|
||||||
### yarn, npm
|
### npm
|
||||||
|
|
||||||
To remove the code-server global module, run:
|
To remove the code-server global module, run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn global remove code-server
|
npm uninstall --global code-server
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```shell
|
|
||||||
npm uninstall -g code-server
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Debian, Ubuntu
|
### Debian, Ubuntu
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"title": "npm",
|
"title": "npm",
|
||||||
"description": "How to install code-server using npm or yarn",
|
"description": "How to install code-server using npm",
|
||||||
"path": "./npm.md"
|
"path": "./npm.md"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
24
docs/npm.md
24
docs/npm.md
|
@ -20,6 +20,11 @@ If you're installing code-server via `npm`, you'll need to install additional
|
||||||
dependencies required to build the native modules used by VS Code. This article
|
dependencies required to build the native modules used by VS Code. This article
|
||||||
includes installing instructions based on your operating system.
|
includes installing instructions based on your operating system.
|
||||||
|
|
||||||
|
> **WARNING**: Do not use `yarn` to install code-server. Unlike `npm`, it does not respect
|
||||||
|
> lockfiles for distributed applications. It will instead use the latest version
|
||||||
|
> available at installation time - which might not be the one used for a given
|
||||||
|
> code-server release, and [might lead to unexpected behavior](https://github.com/coder/code-server/issues/4927).
|
||||||
|
|
||||||
## Node.js version
|
## Node.js version
|
||||||
|
|
||||||
We use the same major version of Node.js shipped with Code's remote, which is
|
We use the same major version of Node.js shipped with Code's remote, which is
|
||||||
|
@ -72,7 +77,7 @@ Proceed to [installing](#installing)
|
||||||
## FreeBSD
|
## FreeBSD
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pkg install -y git python npm-node16 yarn-node16 pkgconf
|
pkg install -y git python npm-node16 pkgconf
|
||||||
pkg install -y libinotify
|
pkg install -y libinotify
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -85,8 +90,7 @@ Installing code-server requires all of the [prerequisites for VS Code developmen
|
||||||
Next, install code-server with:
|
Next, install code-server with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn global add code-server
|
npm install --global code-server --unsafe-perm
|
||||||
# Or: npm install -g code-server
|
|
||||||
code-server
|
code-server
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
|
@ -96,8 +100,7 @@ A `postinstall.sh` script will attempt to run. Select your terminal (e.g., Git b
|
||||||
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:
|
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:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn global bin
|
npm config get prefix
|
||||||
# Or: npm config get prefix
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For help and additional troubleshooting, see [#1397](https://github.com/coder/code-server/issues/1397).
|
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
|
||||||
After adding the dependencies for your OS, install the code-server package globally:
|
After adding the dependencies for your OS, install the code-server package globally:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn global add code-server
|
npm install --global code-server --unsafe-perm
|
||||||
# Or: npm install -g code-server
|
|
||||||
code-server
|
code-server
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
|
@ -122,7 +124,7 @@ page](https://github.com/coder/code-server/discussions).
|
||||||
|
|
||||||
Occasionally, you may run into issues with Node.js.
|
Occasionally, you may run into issues with Node.js.
|
||||||
|
|
||||||
If you install code-server using `yarn` or `npm`, and you upgrade your Node.js
|
If you install code-server using `npm`, and you upgrade your Node.js
|
||||||
version, you may need to reinstall code-server to recompile native modules.
|
version, you may need to reinstall code-server to recompile native modules.
|
||||||
Sometimes, you can get around this by navigating into code-server's `lib/vscode`
|
Sometimes, you can get around this by navigating into code-server's `lib/vscode`
|
||||||
directory and running `npm rebuild` to recompile the modules.
|
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:
|
||||||
|
|
||||||
### Debugging install issues with npm
|
### Debugging install issues with npm
|
||||||
|
|
||||||
`yarn` suppresses logs when running `yarn global add`, so to debug installation issues, install with `npm` instead:
|
To debug installation issues, install with `npm`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Uninstall
|
# Uninstall
|
||||||
npm uninstall -g --unsafe-perm code-server > /dev/null 2>&1
|
npm uninstall --global --unsafe-perm code-server > /dev/null 2>&1
|
||||||
|
|
||||||
# Install with logging
|
# Install with logging
|
||||||
npm install --loglevel verbose -g --unsafe-perm code-server
|
npm install --loglevel verbose --global --unsafe-perm code-server
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Termux
|
# Termux
|
||||||
|
|
||||||
- [Install](#install)
|
- [Install](#install)
|
||||||
- [Yarn Installation](#yarn-installation)
|
- [NPM Installation](#npm-installation)
|
||||||
- [Upgrade](#upgrade)
|
- [Upgrade](#upgrade)
|
||||||
- [Known Issues](#known-issues)
|
- [Known Issues](#known-issues)
|
||||||
- [Git won't work in `/sdcard`](#git-wont-work-in-sdcard)
|
- [Git won't work in `/sdcard`](#git-wont-work-in-sdcard)
|
||||||
|
@ -66,7 +66,7 @@ curl -fsSL https://code-server.dev/install.sh | sh
|
||||||
> 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.\
|
> 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.\
|
||||||
> Learn how to add a user [here](#create-a-new-user).
|
> Learn how to add a user [here](#create-a-new-user).
|
||||||
|
|
||||||
## Yarn Installation
|
## NPM Installation
|
||||||
|
|
||||||
1. Get [Termux](https://f-droid.org/en/packages/com.termux/) from **F-Droid**.
|
1. Get [Termux](https://f-droid.org/en/packages/com.termux/) from **F-Droid**.
|
||||||
|
|
||||||
|
@ -93,7 +93,6 @@ pkg install -y \
|
||||||
binutils \
|
binutils \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
python3 \
|
python3 \
|
||||||
yarn \
|
|
||||||
nodejs-lts
|
nodejs-lts
|
||||||
npm config set python python3
|
npm config set python python3
|
||||||
node -v
|
node -v
|
||||||
|
@ -101,11 +100,7 @@ node -v
|
||||||
|
|
||||||
you will get node version `v16.15.0`
|
you will get node version `v16.15.0`
|
||||||
|
|
||||||
5. Now install code-server
|
5. Now install code-server following our guide on [installing with npm][./npm.md](./npm.md)
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn global add code-server
|
|
||||||
```
|
|
||||||
|
|
||||||
6. Congratulation code-server is installed on your device using the following command.
|
6. Congratulation code-server is installed on your device using the following command.
|
||||||
|
|
||||||
|
@ -116,7 +111,7 @@ code-server --auth none
|
||||||
7. If already installed then use the following command for upgradation.
|
7. If already installed then use the following command for upgradation.
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn upgrade code-server
|
npm update --global code-server --unsafe-perm
|
||||||
```
|
```
|
||||||
|
|
||||||
## Upgrade
|
## Upgrade
|
||||||
|
|
Loading…
Reference in New Issue