3
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

posted at

How to Install Yarn in Ubuntu 18.04 LTS?

1. Configure the repository

$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

2. Install Yarn

$ sudo apt-get update && sudo apt-get install --no-install-recommends yarn

--> Because I used NVM to install NodeJS, I Added "--no-install-recommends".

...
Recommended packages:
  nodejs
The following NEW packages will be installed:
  yarn
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 697 kB of archives.
After this operation, 4,436 kB of additional disk space will be used.
Get:1 https://dl.yarnpkg.com/debian stable/main amd64 yarn all 1.7.0-1 [697 kB]
Fetched 697 kB in 1s (1,105 kB/s)
Selecting previously unselected package yarn.
(Reading database ... 166162 files and directories currently installed.)
Preparing to unpack .../archives/yarn_1.7.0-1_all.deb ...
Unpacking yarn (1.7.0-1) ...
Setting up yarn (1.7.0-1) ...
...

3. Verified Yarn Installtation.

$ yarn -v

1.7.0

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
3
Help us understand the problem. What are the problem?