当前位置:网站首页>npm ---- install yarn
npm ---- install yarn
2022-08-02 06:45:00 【m0_67392931】
NPM ---- install yarn
The premise of installing
yarnis thatnpmneeds to be installed first, and the environment variables are configured before it can be used.
1. Download and install
npm install yarn -gCheck the version after installation is complete:
yarn --version // 1.22.17Second, 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 -gCheck source:
yarn config get registry // https://registry.npm.taobao.orgyarn config get sass_binary_site // http://cdn.npm.taobao.org/dist/node-sassThree, the advantages of Yarn
yarn is a npm package management tool released by Facebook, which I personally feel very comfortable to use:
- Security
Yarnalgorithmically checks the integrity of each package before executing code. - Fast speed
Yarncaches 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.Andnpmwill 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.jsonLet 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
边栏推荐
- 关于 VS Code 优化启动性能的实践
- 金蝶国际:半年亏掉去年一年,疯狂烧钱的商业模式如何持续
- 程序员最重要的能力是什么?
- Analysis of port 9848 error at startup of Nacos client (non-version upgrade problem)
- DNS的解析流程
- Smart people's game improvement: Chapter 3, Lesson 2: "Number of Tongtong" (number)
- C语言操作符详解(2)
- The advantages of making web3d dynamic product display
- pytorch基本操作:使用神经网络进行分类任务
- [OpenCV from entry to practice] image processing technology [pixel] (the most detailed in the whole network)
猜你喜欢

秒杀系统小demo

Nacos安装详细过程

Not annotated parameter overrides @NonNullApi parameter

25K test old bird's 6-year experience in interviews, four types of companies, four types of questions...

leetcode括号匹配问题——32.最长有效括号

Leetcode parentheses matching problem -- 32. The longest parentheses effectively

Guarantee WIFI security in home and enterprise-with AC and AP networking experiment

51 MCU peripherals: ADC

金山云团队分享 | 5000字读懂Presto如何与Alluxio搭配

【漫画】2021满分程序员行为对照表(最新版)
随机推荐
npm、cnpm的安装
Features and installation of non-relational database MongoDB
机器学习——支持向量机原理
What are the ways to improve software testing capabilities?After reading this article, it will take you up a notch
C竞赛训练
Analysis of the source code of the JS UI framework of Hongmeng system
秒杀系统小demo
The installation of NPM, CNPM
Automated operation and maintenance tools - ansible, overview, installation, module introduction
Node installation and configuration of environment variables
Practice on optimizing startup performance of VS Code
Nacos安装详细过程
flex layout (flexible layout)
程序员写PPT的小技巧
Point Density-Aware Voxels for LiDAR 3D Object Detection 论文笔记
leetcode一步解决链表合并问题
There are more and more talents in software testing. Why are people still reluctant to take the road of software testing?
【OpenCV从入门到实践】图像处理技术[像素](全网最详细)
APT + Transform 实现多模块应用Application生命周期分发
科技赋能拉萨之“肺”,华为助力拉鲁湿地智慧管理守护绿水青山