‘node’ is not recognized – Fixed Yarn on Windows

Published March 3, 2023


‘node’ is not recognized – Fixed Yarn on Windows

yarn is a package manager developed by Facebook ( equal to npm ), but is not made available to the user by default when installing Node.js. Yarn was developed in 2016 from the problem that in the past npm e.g. was not very performant and features such as a lock file were not available.

What is a package?

Packages are JavaScript modules that are supposed to represent reusable code. All currently available packages can be found here: https://www.npmjs.com/. However, each package can depend on other packages. This is in the package.json defined in the area „ dependencies “ or „ devDependencies “.

What is npm?

npm ( „ Node package manager “, first published in 2010 ) is supplied by default with every installation of Node.js and is used to download or manage packages.

Error Review –

yarn –version

Output – ‘node’ is not recognized as an internal or external command, operable program or batch file.

How to Fix Yarn on Windows –

  • For this purpose, we need to install Node.js.
  • Go to this link – nodejs.org , it will redirect you to Nodejs Download Page.
  • Now Download the Installer MSI file as your system structure.
  • After downloading the installer package, install it with double-click on it.
  • Now click the “Next” button. The installation process will start.
  • Accept the user agreement by clicking the box and click on the next button.
  • Choose the desired path where you want to install Node.js.
  • By clicking on the Next button, you will get a custom page setup on the screen. Make sure you choose the npm package manager, not the default of Node.js runtime. This way, we can install Node and NPM simultaneously.
  • Fixed Yarn

  • Now finally click on the install button. it will install node js on your pc.
  • Fixed Yarn

  • Now check the yarn –version in cmd to get the version without any error.
  • Fixed Yarn

Buy Cheap Europe Dedicated Server  at $79