React Native Error - yarn' is not recognized as an internal or external command React Native Error - yarn' is not recognized as an internal or external command reactjs reactjs

React Native Error - yarn' is not recognized as an internal or external command


I faced the same issue and it got resolved by below command

npm install -g yarn


Yarn is a tool created by facebook as an efficient alternative for npm. In your case.. it is just informing that Yarn is not installed in your system. It is not the culprit.

The problem lies in Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object Could not install the app on the device line. It looks like an error with the Java installation.

Solution: Go to C:\Windows\System32 directory and delete java.exe (or rename it to something like java.exe.old)

refer this answer for more details https://stackoverflow.com/a/30577609/5597641.

btw you can install Yarn by typing npm install -g yarn in your command prompt.


you have to install yarn globally in your windows OS type this in CMD

npm install -g yarn

you can check yarn version by typing yarn --verson on CMD