如何在Ubuntu 18.04上安装Yarn

YARN and NPM (Node Package Manager) are the two popular JavaScript package managers to automate the process of installing, updating and removing NPM packages. In this guide, we will learn how to install YARN on the Ubuntu system. We will also look into some of the commonly used YARN commands.

YARN和NPM(节点程序包管理器)是两个流行JavaScript程序包管理器,可自动执行安装,更新和删除NPM程序包的过程。 在本指南中,我们将学习如何在Ubuntu系统上安装YARN。 我们还将研究一些常用的YARN命令。

纱线vs NPM (YARN vs NPM)

NPM has few drawbacks like network connectivity issues, slow installation process to mention few and YARN was developed by Facebook to resolve those shortcomings.

NPM几乎没有缺点,例如网络连接问题,缓慢的安装过程(很少提及),而YARN由Facebook开发来解决这些缺点。

YARN is not a replacement for NPM but in fact, it uses the same modules from NPM registry but with the different installation method. Since Yarn doesn’t require you to make any changes to the current workflow, it is possible to install YARN and use it at any point of time during your projects development phase.

YARN不能替代NPM,但实际上,它使用NPM注册表中的相同模块,但安装方法不同。 由于Yarn不需要您对当前工作流程进行任何更改,因此可以在项目开发阶段的任何时间点安装YARN并使用它。

Let’s get started with the installation of Yarn in an Ubuntu 18.04 system via the official Yarn APT package repository.

让我们开始通过正式的Yarn APT软件包存储库在Ubuntu 18.04系统中安装Yarn。

先决条件 (Prerequisites)

  • You can open a SSH session in your Ubuntu 18.04 system using root or a sudo enabled user.

    您可以使用root或启用sudo用户在Ubuntu 18.04系统中打开SSH会话。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值