如何卸载纱线?我已经将它用于一个react-native项目,现在每当我将代码移出index.ios.js或index.android.js时,它都会抛出一个错误,所以我只想使用npm,但每当我初始化一个react-native项目时,它默认为yarn。我尝试了npm卸载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/
其他回答
如果你安装了brew,尝试在终端提示下卸载yarn。还记得在.bash_profile中删除纱线路径信息。
我这边做了什么:
转到/usr/local/lib/node_modules目录,删除其中的yarn文件夹。
这是如何为Mac用户完全卸载yarn
sudo npm uninstall -g 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/
推荐文章
- ReferenceError: description没有定义NodeJs
- 将一个二进制的NodeJS Buffer转换为JavaScript的ArrayBuffer
- AngularJS只适用于单页应用程序吗?
- 如何在vue-cli项目中更改端口号
- 同步和异步编程(在node.js中)的区别是什么?
- 如何编辑通过npm安装的节点模块?
- “node_modules”文件夹应该包含在git存储库中吗
- 使用package.json在全局和本地安装依赖项
- this.libOptions.parse不是一个函数
- 对嵌套文件夹运行npm install的最好方法是什么?
- 节点Multer异常字段
- 很好的初学者教程socket.io?
- CALL_AND_RETRY_LAST分配失败-进程内存不足
- 在Ubuntu上安装Node.js
- 使用express.js代理