Need up to 30 seconds to load.
hello everyone and welcome back in this
lecture we are going to learn how to
install yarn on a windows computer
the preferred way to manage yarn is
through core pack corepak is a new
binary that is included with nodejs
starting with node.js
16.10 so you will need node 16.10 or
higher for this
installation
core pack will act as an intermediary
between
you the developer and yarn
and corepack allows us to use different
package manager versions so we don't
have to check in the yarn binary anymore
so
we need to open our command prompt
application
however we have to open it as an
administrator so search for the command
prompt and then right click on it and
select run as administrator
you'll get the question do you want to
allow the app to make changes to the
device you select yes because we're
going to be using the terminal to make
changes to the computer so you should
see that you're in windows and you're in
your system
core pack is included with all node.js
installs but you have to opt into using
corepak so to enable corepak use the
command corepak enable in your terminal
next up
we can now use yarn if you have an older
version of node that doesn't have core
pack then you can install core pack via
npm
so now you have access to yarn you can
check out the yarn
command with the
command yarn
you should see your version of yarn
and
an upgrade if required so in our case
yarn is up to date so now core pack is
keeping yarn up to date
and you can check your yarn version with
yarn-v
as well
so now you can use yarn commands like
initiating a project or installing
and more so that is how you can get yarn
the latest version
on windows so this is using however yarn
version one
but what if we want to upgrade yarn for
example the current version is
3.5 around there
so if we want to upgrade yarn to the
latest version
then we can use the command yarn set
version
stable
this is going to
set the version of yarn to
the latest stable version which means
the latest version that doesn't have any
bugs in it so you should see this
retrieval message and then saving the
new release so now if you type in yarn
well let's see here we can see we get
migrating from yarn one automatically
enabling the compatibility node so if we
check our version of yarn this time we
have 3.2.0
so you can install yarn via core pack
as we just saw but then you also have to
set the yarn version that you want to
use likely you want to use the latest
version because it is the one with the
newest features and the fewest bugs so
that is how you can install
yarn and update it on windows if you
liked this video then go to training dot
mammoth interactive dot com we have tons
more content on blockchain web
development machine learning and much
more
we also have a membership for just 19 a
month where you can get access to our
372 course bundle and counting
you