Skip to content

Commit

Permalink
Update documentation (nodesource#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
igsu authored Aug 10, 2021
1 parent 1ed642a commit 52273a9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 59 deletions.
59 changes: 0 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,64 +365,6 @@ yum install gcc-c++ make
# or: yum groupinstall 'Development Tools'
```

<a name="snap"></a>
## Snap packages

<a href="https://snapcraft.io/"><img src="images/snapcraft.png" width="560" height="175.6" title="Snapcraft"></a>

<a name="snapabout"></a>
### About

[Snaps](https://docs.snapcraft.io/snaps/) are containerized software packages designed to work across cloud, desktop, and IoT devices. They work natively on most popular Linux distributions and feature automatic transactional updates.

The NodeSource-managed Node.js snap contains the Node.js runtime, along with the two most widely-used package managers, npm and Yarn. They are delivered from the [snapcraft store](https://snapcraft.io/) and are automatically built and pushed for each supported Node.js release line. Generally you will have a new version of Node.js automatically running on your computer the same day it is released on [nodejs.org](https://nodejs.org/).

The Node.js snap can currently be installed on Arch Linux, Debian, Fedora, Linux Mint, Manjaro, OpenEmbedded/Yocto, OpernWrt, Solus, Ubuntu and many other distributions built on top these. NodeSource has not tested the Node.js snap on all of these distributions and feedback is welcome in this repository if you run into problems.

<a name="snapinstall"></a>
### Installation instructions

The `snap` command ships with Ubuntu, from version 16.04 and later. If you do not have it installed, follow the instructions on snapcraft to install [_snapd_](https://docs.snapcraft.io/core/install).

Snaps are delivered via "channels"; for Node.js, the channel names are the major-version number of Node.js. So select a supported Node.js version and install with:

```
sudo snap install node --classic --channel=8
```

Substituting `8` for the major version you want to install. Both LTS and Current versions of Node.js are available via snapcraft.

The `--classic` argument is required here as Node.js needs full access to your system in order to be useful, therefore it needs snap’s "classic confinement". By default, snaps are much more restricted in their ability to access your disk and network and must request special access from you where they need it. Note that on some Linux distributions, the snap confinement mechanisms are not fully supported so `--classic` may not be necessary or even supported.

Once installed, the `node`, `npm` and `yarn` commands are available for use and will remain updated for the channel you selected.

#### Switching channels

You can use the `refresh` command to switch to a new channel at any time:

```
sudo snap refresh node --channel=10
```

Once switched, snapd will update Node.js for the new channel you have selected.

#### Bleeding-edge Node.js

Users feeling adventurous or interested in testing the latest code from the Node.js core developers can install from the "edge" channel. This has an element of risk: it is a direct pipeline from the upstream Node.js [git repository](https://github.com/nodejs/node) to the snap store every day and previews the ongoing development work and may include breaking changes slated for the next major version of Node.js. This is only recommend for those users who are willing to participate in testing and bug reporting upstream:

```
sudo snap install node --classic --channel=edge
```

### Not recommended for production deployments

Due to their auto-updating nature, snaps are not necessarily appropriate for the deployment of your Node.js applications to production. NodeSource recommends a stable and integration-tested deployment pipeline for production applications such as the .deb or .rpm distributions outlined above. However, snaps are an excellent way to keep developer machines updated and allow for trivial and convenient switching between Node.js versions.

<a name="snapadvanced"></a>
### Advanced usage

The `snap` man page, or Canonical’s [advanced snap usage](https://tutorials.ubuntu.com/tutorial/advanced-snap-usage) tutorial contains details of advanced snapd functionality.

<a name="tests"></a>
## Tests

Expand Down Expand Up @@ -500,7 +442,6 @@ We, unfortunately, do not have the resources necessary to support and test the p
* PopOS - [Issue #924](https://github.com/nodesource/distributions/issues/924)
* Kylin - [Issue #1011](https://github.com/nodesource/distributions/issues/1011)
* MakuluLinux - [Issue #1012](https://github.com/nodesource/distributions/issues/1012)
* Alma Linux - [Issue #1166](https://github.com/nodesource/distributions/issues/1166)

<a name="authors-contributors"></a>
## Authors and Contributors
Expand Down
Binary file removed images/snapcraft.png
Binary file not shown.

0 comments on commit 52273a9

Please sign in to comment.