Total Pageviews

Thursday, 5 September 2019

安装nodejs的包管理器-yarn


在linux vps上。
wget https://yarnpkg.com/latest.tar.gz -O yarnpkg-latest.tar.gz
mkdir yarnpkg-latest
mv yarnpkg-latest.tar.gz yarnpkg-latest
cd yarnpkg-latest
tar zxvf yarnpkg-latest.tar.gz
cd yarn-v1.17.3/bin/

[root@host bin]# ls
yarn  yarn.cmd  yarn.js  yarnpkg  yarnpkg.cmd
[root@host bin]# 

[root@host bin]# pwd
/root/yarnpkg-latest/yarn-v1.17.3/bin

[root@host bin]# export PATH=$PATH:/root/yarnpkg-latest/yarn-v1.17.3/bin
[root@host bin]# echo 'export PATH=$PATH:/root/yarnpkg-latest/yarn-v1.17.3/bin' >> /etc/profile && source /etc/profile
[root@host bin]# cd ~
[root@host ~]# which yarn
[root@host ~]# /root/yarnpkg-latest/yarn-v1.17.3/bin/yarn
[root@host ~]# yarn -h

至此,yarn安装完成。

项目:
https://yarnpkg.com/en/docs/install
https://yarnpkg.com/en/ 

相关帖子:https://briteming.blogspot.com/2017/01/yarn-is-package-manager-for-your-code.html

No comments:

Post a Comment