-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update install guidelines #269
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rawhide repository is not included in basic Fedora install AFAIK, so this wouldn't work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will soon work with just --releasever=30 instead of |
||
``` | ||
|
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd add a comment describing what is done, like so:
|
||
$ yarnpkg add request | ||
``` | ||
|
||
If you still wish to use `yarn` instead of `nodejs-yarn`, the best way is to use bash alias. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you include the alias example, please? |
||
|
||
## Installing npm modules | ||
|
||
Installing Node.js modules is covered in [Node.js modules](/tech/languages/nodejs/modules.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version
variable is no longer used anywhere, could you remove it?