Skip to content

Commit

Permalink
Update install guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuzana Svetlikova authored and pvalena committed Aug 28, 2018
1 parent ba42e9b commit e191f9a
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions tech/languages/nodejs/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,45 @@ subsection: nodejs
section: tech-languages
order: 1
version: LTS
description: Open-source cross-platform server-side JavaScript runtime environment.
---

# Node.js

## Node.js and npm
## Node.js and npm installation

Starting from Fedora 24, npm is a part of Node.js package and does not need to be installed separately. Therefore, to install both npm and Node.js, you need to run:

```
$ sudo dnf install nodejs
```

In case you are running Fedora 23, you should run:
This will install V8 Javascript Engine, Node.js runtime and npm package manager and their dependencies. Versions present in repositories are usually current or to-be (in Rawhide) Node.js LTS releases, including npm and V8 engine that come with them.

You can check the available versions with:

```
$ sudo dnf install npm
$ dnf info nodejs
$ dnf info nodejs --enablerepo rawhide
```

This will install V8 Javascript Engine, Node.js runtime and npm package manager and their dependencies. Versions present in repositories are usually current or to-be (in Rawhide) Node.js LTS releases, including npm and V8 engine that come with them.
## Yarn

If you wish to install Node.js v4:
[Yarn](https://yarnpkg.com/en/) package manager is available since Fedora 29. You can install it by running:

```
$ sudo dnf install nodejs --releasever=24
$ sudo dnf install nodejs-yarn
```

If you need Node.js v6:
Because of conflicts with other packages, yarn has to be used in the following manner:

```
$ sudo dnf install nodejs --releasever=25
$ nodejs-yarn add request
$ yarnpkg add request
```

If you still wish to use `yarn` instead of `nodejs-yarn`, the best way is to use bash alias.

## Installing npm modules

Installing Node.js modules is covered in [Node.js modules](/tech/languages/nodejs/modules.html).

0 comments on commit e191f9a

Please sign in to comment.