refactor(docs): clean up and restructure

This commit is contained in:
Katie Horne
2021-07-07 11:00:51 -05:00
parent a96e16e593
commit 66b6590e36
13 changed files with 1274 additions and 1113 deletions

View File

@@ -2,23 +2,28 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# npm Install Requirements
- [Node.js version](#nodejs-version)
- [Ubuntu, Debian](#ubuntu-debian)
- [Fedora, CentOS, RHEL](#fedora-centos-rhel)
- [Alpine](#alpine)
- [macOS](#macos)
- [FreeBSD](#freebsd)
- [Issues with Node.js after version upgrades](#issues-with-nodejs-after-version-upgrades)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
If you're installing the npm module you'll need certain dependencies to build the native modules used by VS Code.
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
includes installing instructions based on your operating system.
- Node.js: version `= 14`. Other versions may work, but your mileage may vary.
## Node.js version
_Note: We use the same major version of Node.js that is shipped in VSCode's Electron. VS Code also lists Node.js requirements. See [here](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites)._
We use the same major version of Node.js shipped with VSCode's Electron,
which is currently `14.x`. VS Code also [lists Node.js
requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites).
Related:
- [#1633](https://github.com/cdr/code-server/issues/1633)
Using other versions of Node.js [may lead to unexpected
behavior](https://github.com/cdr/code-server/issues/1633).
## Ubuntu, Debian
@@ -58,3 +63,22 @@ xcode-select --install
pkg install -y git python npm-node14 yarn-node14 pkgconf
pkg install -y libinotify
```
## Issues with Node.js after version upgrades
Occasionally, you may run into issues with Node.js.
If you install code-server using `yarn` or `npm`, and you upgrade your Node.js
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`
directory and running `npm rebuild` to recompile the modules.
A step-by-step example of how you might do this is:
1. Install code-server: `brew install code-server`
2. Navigate into the directory: `cd /usr/local/Cellar/code-server/<version>/libexec/lib/vscode/`
3. Recompile the native modules: `npm rebuild`
4. Restart code-server
If you need further assistance, post on our [GitHub Discussions
page](https://github.com/cdr/code-server/discussions).