当前位置:网站首页>npm ---- install yarn
npm ---- install yarn
2022-08-02 06:45:00 【m0_67392931】
NPM ---- install yarn
The premise of installing
yarn
is thatnpm
needs to be installed first, and the environment variables are configured before it can be used.
1. Download and install
npm install yarn -g
Check the version after installation is complete:
yarn --version // 1.22.17
Second, configure Yarn
Configuration Source:
yarn config set registry https://registry.npm.taobao.org -gyarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
Check source:
yarn config get registry // https://registry.npm.taobao.orgyarn config get sass_binary_site // http://cdn.npm.taobao.org/dist/node-sass
Three, the advantages of Yarn
yarn
is a npm
package management tool released by Facebook, which I personally feel very comfortable to use:
- Security
Yarn
algorithmically checks the integrity of each package before executing code. - Fast speed
Yarn
caches every downloaded package, so you don't need to download it again when you use it again.Also takes advantage of parallel downloads to maximize resource utilization, so installations are faster. - Reliable
Due to the mechanism ofyarn.lock
, the versions of dependencies in the project will be locked, so there is no need to worry about version inconsistencies during collaborative development.Andnpm
will always download the latest dependency version for you, which is very bloody.
Fourth, some commonly used Yarn commands
yarn init // Generate package.json fileyarn install // Install all dependencies of yarn.lockyarn install --force // reinstall dependenciesyarn remove moduleName // remove dependenciesyarn add moduleName // install a dependencyyarn add moduleName --dev/-D // Install to development environmentyarn run scriptName // Execute the script command named by package.json
Let me introduce myself first. The editor graduated from Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Ali in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- MySQL联合查询(多表查询)
- The installation of NPM, CNPM
- [OpenCV from entry to practice] image processing technology [pixel] (the most detailed in the whole network)
- Integrate ssm (1)
- 金蝶国际:半年亏掉去年一年,疯狂烧钱的商业模式如何持续
- 在腾讯做外包测试的那些日子.....
- Point Density-Aware Voxels for LiDAR 3D Object Detection Paper Notes
- There are more and more talents in software testing. Why are people still reluctant to take the road of software testing?
- leetcode solves the linked list merge problem in one step
- HCIP BGP综合实验 建立对等体、路由反射器、联邦、路由宣告及聚合
猜你喜欢
BGP experiment (route reflector, federation, route optimization)
zabbix邮件报警和微信报警
Meta公司内部项目-RaptorX:将Presto性能提升10倍
Node的安装与环境变量的配置
关于 VS Code 优化启动性能的实践
使用TinkerPop框架对GDB增删改查
上海交大牵手淘宝成立媒体计算实验室:推动视频超分等关键技术发展
Differences between i++ and ++i in loops in C language
国际顶会OSDI首度收录淘宝系统论文,端云协同智能获大会主旨演讲推荐
家用 NAS 服务器(4)| MergerFS和SnapRaid数据定时备份
随机推荐
C竞赛训练
聪明人的游戏提高篇:第三章第二课:“桐桐数”(number)
软件测试在职2年跳槽4次,你还在怪老板不给你涨薪?
C 竞赛——捕鱼
在腾讯做外包测试的那些日子.....
Constructors, member variables, local variables
直播系统聊天技术(八):vivo直播系统中IM消息模块的架构实践
淘系资深工程师整理的300+项学习资源清单(2021最新版)
eggjs controller层调用controller层解决方案
国际顶会OSDI首度收录淘宝系统论文,端云协同智能获大会主旨演讲推荐
Stress testing and performance analysis of node projects
25K test old bird's 6-year experience in interviews, four types of companies, four types of questions...
保证家里和企业中的WIFI安全-附AC与AP组网实验
面试官:设计“抖音”直播功能测试用例吧
C语言操作符详解(2)
点云旋转到参考坐标系方向(最小方向包围盒方法)
代码编世界 科技创未来
Node installation and configuration of environment variables
leetcode solves the linked list merge problem in one step
HCIP第十七天