如何卸载纱线?我已经将它用于一个react-native项目,现在每当我将代码移出index.ios.js或index.android.js时,它都会抛出一个错误,所以我只想使用npm,但每当我初始化一个react-native项目时,它默认为yarn。我尝试了npm卸载yarn,但没有工作。谢谢。
当前回答
我这边做了什么:
转到/usr/local/lib/node_modules目录,删除其中的yarn文件夹。
其他回答
没有看到对我有用的答案,所以它是:在我的OSX系统上,我在~/.yarn/bin/yarn找到了yarn。Rm -rf ~/。纱处理了它。
如果你像这样在全球安装纱线
$ sudo npm install -g yarn
在终端中运行即可
$ sudo npm uninstall -g yarn
现在在运行Ubuntu的本地机器上测试。完美的工作!
如果你正在使用corepack,并且之前运行了corepack enable命令,那么你可以通过以下命令卸载yarn:
corepack disable yarn
windows:在控制面板中选择“添加或删除程序”(或打开开始菜单,搜索“删除程序”)
https://github.com/yarnpkg/yarn/issues/3331
Windows:
我需要做这些步骤,以完全去除纱线从系统。
Go to add or remove programs and then search for yarn and uninstall it(if you installed it with the .msi) npm uninstall -g yarn (if you installed with npm) Remove any existing yarn folders from your Program Files (x86) (Program Files (x86)\Yarn). Also need to delete your Appdata\local\yarn folder ( type %LOCALAPPDATA% in the run dialog box (win+R), it opens a local folder and there you'll find the yarn folder to delete) Finally,check your user directory and remove all .yarn folder, .yarn.lock file, .yarnrc etc ( from C:\Users\<user>\)
推荐文章
- 使用过程。TypeScript中的env
- 如何找到哪些承诺未处理在Node.js UnhandledPromiseRejectionWarning?
- 如何卸载Yarn
- Haskell对Node.js的响应是什么?
- npm不工作-“读取ECONNRESET”
- npm install from Git在特定的版本
- Node.js创建文件夹或使用现有的
- 顺序运行NPM脚本
- NPM卡住给出相同的错误EISDIR:对目录的非法操作,读取错误(本机)
- 检查已安装的angular-cli版本?
- 如何将Blob转换为JavaScript文件
- 如何用Express/Node以编程方式发送404响应?
- 如何安装包从github回购在纱线
- 什么时候.then(success, fail)被认为是承诺的反模式?
- 自动HTTPS连接/重定向使用node.js/express