| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,7 +141,7 @@ Run your build: | |||
| 141 | 141 | ||
| 142 | 142 | ```shell | |
| 143 | 143 | cd release | |
| 144 | - yarn --production # Skip if you used KEEP_MODULES=1 | ||
| 144 | + npm install --omit=dev # Skip if you used KEEP_MODULES=1 | ||
| 145 | 145 | # Runs the built JavaScript with Node. | |
| 146 | 146 | node . | |
| 147 | 147 | ``` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | 1. Install UserLAnd from [Google Play](https://play.google.com/store/apps/details?id=tech.ula&hl=en_US&gl=US) | |
| 4 | 4 | 2. Install an Ubuntu VM | |
| 5 | 5 | 3. Start app | |
| 6 | - 4. Install Node.js, `curl` and `yarn` using `sudo apt install nodejs npm yarn curl -y` | ||
| 6 | + 4. Install Node.js and `curl` using `sudo apt install nodejs npm curl -y` | ||
| 7 | 7 | 5. Install `nvm`: | |
| 8 | 8 | ||
| 9 | 9 | ```shell | |
@@ -18,6 +18,6 @@ nvm install 16 | |||
| 18 | 18 | nvm use 16 | |
| 19 | 19 | ``` | |
| 20 | 20 | ||
| 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 --unsafe-perm` | ||
| 22 | 22 | 9. Run code-server with `code-server` | |
| 23 | 23 | 10. Access on localhost:8080 in your browser | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | 5 | - [install.sh](#installsh) | |
| 6 | 6 | - [Detection reference](#detection-reference) | |
| 7 | - - [yarn, npm](#yarn-npm) | ||
| 7 | + - [npm](#npm) | ||
| 8 | 8 | - [Standalone releases](#standalone-releases) | |
| 9 | 9 | - [Debian, Ubuntu](#debian-ubuntu) | |
| 10 | 10 | - [Fedora, CentOS, RHEL, SUSE](#fedora-centos-rhel-suse) | |
@@ -20,7 +20,7 @@ | |||
| 20 | 20 | - [Uninstall](#uninstall) | |
| 21 | 21 | - [install.sh](#installsh-1) | |
| 22 | 22 | - [Homebrew](#homebrew) | |
| 23 | - - [yarn, npm](#yarn-npm-1) | ||
| 23 | + - [npm](#npm-1) | ||
| 24 | 24 | - [Debian, Ubuntu](#debian-ubuntu-1) | |
| 25 | 25 | ||
| 26 | 26 | <!-- 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. | |||
| 88 | 88 | ||
| 89 | 89 | - Ensure that you add `~/.local/bin` to your `$PATH` to run code-server. | |
| 90 | 90 | ||
| 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` | ||
| 93 | 92 | ||
| 94 | 93 | - 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` | ||
| 96 | 95 | - 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. | ||
| 98 | 97 | ||
| 99 | - ## yarn, npm | ||
| 98 | + ## npm | ||
| 100 | 99 | ||
| 101 | - We recommend installing with `yarn` or `npm` when: | ||
| 100 | + We recommend installing with `npm` when: | ||
| 102 | 101 | ||
| 103 | 102 | 1. You aren't using a machine with `amd64` or `arm64`. | |
| 104 | 103 | 1. You are installing code-server on Windows | |
@@ -108,17 +107,17 @@ We recommend installing with `yarn` or `npm` when: | |||
| 108 | 107 | [#1430](https://github.com/coder/code-server/issues/1430#issuecomment-629883198) | |
| 109 | 108 | for more information. | |
| 110 | 109 | ||
| 111 | - Installing code-server with `yarn` or `npm` builds native modules on install. | ||
| 110 | + Installing code-server with `npm` builds native modules on install. | ||
| 112 | 111 | ||
| 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. | ||
| 114 | 113 | ||
| 115 | 114 | ## Standalone releases | |
| 116 | 115 | ||
| 117 | 116 | We publish self-contained `.tar.gz` archives for every release on | |
| 118 | 117 | [GitHub](https://github.com/coder/code-server/releases). The archives bundle the | |
| 119 | 118 | node binary and node modules. | |
| 120 | 119 | ||
| 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 | ||
| 122 | 121 | then create the remaining releases using the standalone version. | |
| 123 | 122 | ||
| 124 | 123 | The only requirement to use the standalone release is `glibc` >= 2.17 and | |
@@ -152,7 +151,7 @@ code-server | |||
| 152 | 151 | ## Debian, Ubuntu | |
| 153 | 152 | ||
| 154 | 153 | > 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). | ||
| 156 | 155 | ||
| 157 | 156 | ```bash | |
| 158 | 157 | 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 | |||
| 164 | 163 | ## Fedora, CentOS, RHEL, SUSE | |
| 165 | 164 | ||
| 166 | 165 | > The standalone arm64 .rpm does not support CentOS 7. Please upgrade or [build | |
| 167 | - > with yarn](#yarn-npm). | ||
| 166 | + > with npm](#npm). | ||
| 168 | 167 | ||
| 169 | 168 | ```bash | |
| 170 | 169 | 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 | |||
| 295 | 294 | ||
| 296 | 295 | ## Windows | |
| 297 | 296 | ||
| 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). | ||
| 299 | 298 | ||
| 300 | 299 | > 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. | |
| 301 | 300 | ||
| 302 | 301 | ## Raspberry Pi | |
| 303 | 302 | ||
| 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). | ||
| 306 | 304 | ||
| 307 | 305 | If you see an error related to `node-gyp` during installation, See [#5174](https://github.com/coder/code-server/issues/5174) for more information. | |
| 308 | 306 | ||
@@ -346,18 +344,12 @@ brew remove code-server | |||
| 346 | 344 | brew uninstall code-server | |
| 347 | 345 | ``` | |
| 348 | 346 | ||
| 349 | - ### yarn, npm | ||
| 347 | + ### npm | ||
| 350 | 348 | ||
| 351 | 349 | To remove the code-server global module, run: | |
| 352 | 350 | ||
| 353 | 351 | ```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 | ||
| 361 | 353 | ``` | |
| 362 | 354 | ||
| 363 | 355 | ### Debian, Ubuntu | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ | |||
| 21 | 21 | "children": [ | |
| 22 | 22 | { | |
| 23 | 23 | "title": "npm", | |
| 24 | - "description": "How to install code-server using npm or yarn", | ||
| 24 | + "description": "How to install code-server using npm", | ||
| 25 | 25 | "path": "./npm.md" | |
| 26 | 26 | }, | |
| 27 | 27 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,11 @@ If you're installing code-server via `npm`, you'll need to install additional | |||
| 20 | 20 | dependencies required to build the native modules used by VS Code. This article | |
| 21 | 21 | includes installing instructions based on your operating system. | |
| 22 | 22 | ||
| 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 | + | ||
| 23 | 28 | ## Node.js version | |
| 24 | 29 | ||
| 25 | 30 | We use the same major version of Node.js shipped with Code's remote, which is | |
@@ -72,7 +77,7 @@ Proceed to [installing](#installing) | |||
| 72 | 77 | ## FreeBSD | |
| 73 | 78 | ||
| 74 | 79 | ```sh | |
| 75 | - pkg install -y git python npm-node16 yarn-node16 pkgconf | ||
| 80 | + pkg install -y git python npm-node16 pkgconf | ||
| 76 | 81 | pkg install -y libinotify | |
| 77 | 82 | ``` | |
| 78 | 83 | ||
@@ -85,8 +90,7 @@ Installing code-server requires all of the [prerequisites for VS Code developmen | |||
| 85 | 90 | Next, install code-server with: | |
| 86 | 91 | ||
| 87 | 92 | ```bash | |
| 88 | - yarn global add code-server | ||
| 89 | - # Or: npm install -g code-server | ||
| 93 | + npm install --global code-server --unsafe-perm | ||
| 90 | 94 | code-server | |
| 91 | 95 | # Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml | |
| 92 | 96 | ``` | |
@@ -96,8 +100,7 @@ A `postinstall.sh` script will attempt to run. Select your terminal (e.g., Git b | |||
| 96 | 100 | 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: | |
| 97 | 101 | ||
| 98 | 102 | ```shell | |
| 99 | - yarn global bin | ||
| 100 | - # Or: npm config get prefix | ||
| 103 | + npm config get prefix | ||
| 101 | 104 | ``` | |
| 102 | 105 | ||
| 103 | 106 | 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 | |||
| 107 | 110 | After adding the dependencies for your OS, install the code-server package globally: | |
| 108 | 111 | ||
| 109 | 112 | ```bash | |
| 110 | - yarn global add code-server | ||
| 111 | - # Or: npm install -g code-server | ||
| 113 | + npm install --global code-server --unsafe-perm | ||
| 112 | 114 | code-server | |
| 113 | 115 | # Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml | |
| 114 | 116 | ``` | |
@@ -122,7 +124,7 @@ page](https://github.com/coder/code-server/discussions). | |||
| 122 | 124 | ||
| 123 | 125 | Occasionally, you may run into issues with Node.js. | |
| 124 | 126 | ||
| 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 | ||
| 126 | 128 | version, you may need to reinstall code-server to recompile native modules. | |
| 127 | 129 | Sometimes, you can get around this by navigating into code-server's `lib/vscode` | |
| 128 | 130 | 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: | |||
| 136 | 138 | ||
| 137 | 139 | ### Debugging install issues with npm | |
| 138 | 140 | ||
| 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`: | ||
| 140 | 142 | ||
| 141 | 143 | ```shell | |
| 142 | 144 | # 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 | ||
| 144 | 146 | ||
| 145 | 147 | # Install with logging | |
| 146 | - npm install --loglevel verbose -g --unsafe-perm code-server | ||
| 148 | + npm install --loglevel verbose --global --unsafe-perm code-server | ||
| 147 | 149 | ``` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | # Termux | |
| 4 | 4 | ||
| 5 | 5 | - [Install](#install) | |
| 6 | - - [Yarn Installation](#yarn-installation) | ||
| 6 | + - [NPM Installation](#npm-installation) | ||
| 7 | 7 | - [Upgrade](#upgrade) | |
| 8 | 8 | - [Known Issues](#known-issues) | |
| 9 | 9 | - [Git won't work in `/sdcard`](#git-wont-work-in-sdcard) | |
@@ -66,7 +66,7 @@ curl -fsSL https://code-server.dev/install.sh | sh | |||
| 66 | 66 | > 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.\ | |
| 67 | 67 | > Learn how to add a user [here](#create-a-new-user). | |
| 68 | 68 | ||
| 69 | - ## Yarn Installation | ||
| 69 | + ## NPM Installation | ||
| 70 | 70 | ||
| 71 | 71 | 1. Get [Termux](https://f-droid.org/en/packages/com.termux/) from **F-Droid**. | |
| 72 | 72 | ||
@@ -93,19 +93,14 @@ pkg install -y \ | |||
| 93 | 93 | binutils \ | |
| 94 | 94 | pkg-config \ | |
| 95 | 95 | python3 \ | |
| 96 | - yarn \ | ||
| 97 | 96 | nodejs-lts | |
| 98 | 97 | npm config set python python3 | |
| 99 | 98 | node -v | |
| 100 | 99 | ``` | |
| 101 | 100 | ||
| 102 | 101 | you will get node version `v16.15.0` | |
| 103 | 102 | ||
| 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) | ||
| 109 | 104 | ||
| 110 | 105 | 6. Congratulation code-server is installed on your device using the following command. | |
| 111 | 106 | ||
@@ -116,7 +111,7 @@ code-server --auth none | |||
| 116 | 111 | 7. If already installed then use the following command for upgradation. | |
| 117 | 112 | ||
| 118 | 113 | ``` | |
| 119 | - yarn upgrade code-server | ||
| 114 | + npm update --global code-server --unsafe-perm | ||
| 120 | 115 | ``` | |
| 121 | 116 | ||
| 122 | 117 | ## Upgrade | |
| Back | FazBrowse Home | New Git URL |
0 commit comments