本文介绍了如何卸载 Yarn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何卸载纱线?我已经将它用于本机项目,现在每当我将代码移出 index.ios.jsindex.android.js 时,它都会引发错误,因此我只想使用 npm 但每当我初始化一个 react-native 项目时,它默认为 yarn.我试过 npm uninstall yarn 但这没有用.谢谢.

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 throws an error so I'd like to just use npm but whenever I initialize a react-native project it defaults to yarn. I tried npm uninstall yarn but that didn't work. Thanks.

推荐答案

取决于您如何安装它:

brew:brew 卸载纱线

tarball:rm -rf "$HOME/.yarn"

npm:npm uninstall -g yarn

ubuntu:sudo apt-get remove yarn &&sudo apt-get 清除纱线

centos:yum remove yarn

windows:choco uninstall yarn(或转到控制面板>添加/删除程序并从那里卸载)

windows: choco uninstall yarn (or go to control panel > add/remove programs and uninstall it from there)

这篇关于如何卸载 Yarn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 04:36