如何在ubuntu上安装yarn(ubuntu安装yarn具体方法)

在Ubuntu上yarn不仅是一个包管理工具,还可以做为项目管理工具,但是很多人不知道如何在ubuntu上安装yarn,今天就为大家带来这个ubuntu安装yarn具体方法。

ubuntu安装yarn

1、配置仓库

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

2、更新并安装

sudo apt update && sudo apt install yarn

3、查看安装版本

yarn --version

安装yarn常见的错误

错误提示:ERROR: There are no scenarios; must have at least one.

解决办法:

sudo apt remove cmdtest
sudo apt remove yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn

错误提示:error excalidraw@: The engine “node” is incompatible with this module. Expected version “>=14.0.0”. Got “10.19.0”

解决办法:

yarn config set ignore-engines true

相关文章