How Do I Uninstall Yarn

前端 未结 19 1361
醉话见心
醉话见心 2020-12-22 17:45

How can I uninstall yarn? I\'ve used it for a react-native project and now whenever I move the code out of index.ios.js or index.android.js it thro

19条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-22 18:10

    On my Mac neither of these regular methods to uninstall Yarn worked:

    brew: brew uninstall yarn

    npm: npm uninstall -g yarn

    Instead I removed it manually by typing rm -rf ~/.yarn (thanks user elthrasher) and deleting the two symbol links yarn and yarnpkg from usr/local/bin. Afterwards brew install yarn gave me the latest version of Yarn.


    Background: The fact that I had a very outdated version of Yarn installed gave me utterly incomprehensible errors while trying to install additional modules to a project set up with Vue CLI Service and Vue UI, which apparently uses Yarn 'under the hood'. I generally use NPM so it took me a while to figure out the cause for my trouble. Naturally googling error messages produced by such module incompatibilities presented no clues. With Yarn updated everything works just perfectly now.

提交回复
热议问题