Skip to content

Install Node.js and Yarn with asdf

syl-p edited this page Jan 31, 2024 · 5 revisions

Install Node.js:

We are going to use asdf for this part. Install Node.js with this command:

asdf plugin add nodejs

Then install the adequate Node.js version 20.10.0:

asdf install nodejs 20.10.0

Now, we have to use it as our main Node.js version:

asdf global nodejs 20.10.0

Next, install Yarn:

asdf plugin add yarn

We are using the Yarn 1.22.19 and use it as our global Yarn version.

asdf install yarn 1.22.19
asdf global yarn 1.22.19

Checking your Node version

To show the current version, type:

node --version