yarn icon indicating copy to clipboard operation
yarn copied to clipboard

'Yarn' is not recognized as an internal or external command,

Open duycoder opened this issue 9 years ago • 10 comments

  • Using nodeJS v8.2.1
  • Yarn 0.15.0 ( the lattest version in this time ) I installed yarn on my windows 7 computer by Chocolately. The installation was success but then i write this command to test : "yarn --version", the cmd said : 'Yarn' is not recognized as an internal or external command, operable program or batch file. Anyone know how to solve this problem ?

duycoder avatar Aug 18 '17 02:08 duycoder

Yarn 0.15.0 is very old now 😄 please try v0.27.5 which is the latest stable version.

Daniel15 avatar Aug 18 '17 03:08 Daniel15

Tks Daniel15 :)

duycoder avatar Aug 18 '17 05:08 duycoder

If you are using windows check if C:\Program Files (x86)\Yarn\bin is in your path variable. If not after adding in path variable open new cmd

vishrantgupta avatar Oct 14 '17 17:10 vishrantgupta

Try like this npm install yarn -g

MaungC avatar Jul 16 '18 12:07 MaungC

You might be able to install Yarn locally with

npm i -S yarn and then add it to your path SET PATH=%PATH%;c:\to\your\project\node_modules.bin\yarn Now in the same terminal window you can use it with yarn install ..

SaqibAltaf avatar Aug 18 '18 05:08 SaqibAltaf

After installing by .msi file , if not recognized in command prompt then in your environment variables path add C:\Program Files (x86)\Yarn\bin . C:\Users\Ritu\AppData\Local\Yarn\bin; was added in environment variable path by .msi file itself while installation, in addition to that i added C:\Program Files (x86)\Yarn\bin also . I am not sure why it is happening, even in latest versions also.

windows 10 npm version : 6.5.0 node version : 8.12.0 yarn version : 1.13.0

RITUait avatar Feb 24 '19 09:02 RITUait

After installing by .msi file , if not recognized in command prompt then in your environment variables path add C:\Program Files (x86)\Yarn\bin . C:\Users\Ritu\AppData\Local\Yarn\bin; was added in environment variable path by .msi file itself while installation, in addition to that i added C:\Program Files (x86)\Yarn\bin also . I am not sure why it is happening, even in latest versions also.

windows 10 npm version : 6.5.0 node version : 8.12.0 yarn version : 1.13.0

may be helpful for you https://github.com/yarnpkg/yarn/issues/2504#issue-201894785

EliotCao avatar Apr 04 '19 05:04 EliotCao

Try like this npm install yarn -g

this solution makes a yarn path specified. This was the solution to my problem.

egemenakturk avatar Nov 27 '19 06:11 egemenakturk

If you are facing this error yarn : The term 'yarn' is not recognized as the name of a cmdlet, function, script file, or operable program. then Just run this command npm install -g yarn

Rajnikantlodhi avatar Feb 21 '20 10:02 Rajnikantlodhi

Try like this npm install yarn -g

this code is worked for me thanks

mostafakhavari avatar Feb 24 '20 17:02 mostafakhavari