如何卸载纱线?我已经将它用于一个react-native项目,现在每当我将代码移出index.ios.js或index.android.js时,它都会抛出一个错误,所以我只想使用npm,但每当我初始化一个react-native项目时,它默认为yarn。我尝试了npm卸载yarn,但没有工作。谢谢。
当前回答
这是如何为Mac用户完全卸载yarn
sudo npm uninstall -g yarn
其他回答
如果你安装了brew,尝试在终端提示下卸载yarn。还记得在.bash_profile中删除纱线路径信息。
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>\)
windows用户:
NPM卸载yarn
Mac用户:
$ NPM卸载yarn
它将完全为您的系统除去纱线。
ng set——global packageManager=npm或ng set——global packageManager=yarn
删除线
# macOS & brew
$ brew uninstall yarn
移除NPM包
# yarn global remove
$ sudo yarn global remove @tarojs/cli
# yarn global add
$ sudo yarn global add @tarojs/cli
参考文献:
https://classic.yarnpkg.com/en/docs/cli/global/
https://classic.yarnpkg.com/en/docs/cli/remove/
推荐文章
- 很好的初学者教程socket.io?
- CALL_AND_RETRY_LAST分配失败-进程内存不足
- 在Ubuntu上安装Node.js
- 使用express.js代理
- Node -使用NODE_MODULE_VERSION 51根据不同的Node.js版本编译
- RabbitMQ / AMQP:单队列,同一消息的多个消费者?
- Node.js同步执行系统命令
- 禁用包的postinstall脚本
- Node.js上的html解析器
- 错误:无法找到模块“webpack”
- 在node.js中使用async / await文件系统
- NodeJS -用NPM安装错误
- 如何为本地安装npm包设置自定义位置?
- 回调函数来处理管道的完成
- Express函数中的“res”和“req”参数是什么?