当前位置:网站首页>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
边栏推荐
- leetcode每天5题-Day04
- Polar Parametrization for Vision-based Surround-View 3D Detection 论文笔记
- Node installation and configuration of environment variables
- 面试官:设计“抖音”直播功能测试用例吧
- BGP+MPLS Comprehensive Experiment
- BGP+MPLS综合实验
- C语言小游戏——扫雷小游戏
- Point Density-Aware Voxels for LiDAR 3D Object Detection Paper Notes
- node安装和配置(node-v12.20.2-x64 ) 以及node版本切换介绍
- zabbix邮件报警和微信报警
猜你喜欢

制作web3d动态产品展示的优点

MySQL联合查询(多表查询)

Block elements, inline elements (
elements, span elements)![[Cartoon] 2021 full score programmer behavior comparison table (latest version)](/img/18/2679b35f39b909aa6e013ddf01114b.png)
[Cartoon] 2021 full score programmer behavior comparison table (latest version)

MarkDown Formula Instruction Manual

leetcode每天5题-Day04

leetcode一步解决链表反转问题

Features and installation of non-relational database MongoDB

leetcode一步解决链表合并问题

Not annotated parameter overrides @NonNullApi parameter
随机推荐
保证家里和企业中的WIFI安全-附AC与AP组网实验
Luogu mini game Daquan (everyone who uses Luogu must know)
Smart people's game improvement: Chapter 3, Lesson 2: "Number of Tongtong" (number)
C竞赛训练
MySQL索引常见面试题(2022版)
代码编世界 科技创未来
淘系资深工程师整理的300+项学习资源清单(2021最新版)
npm does not recognize the "npm" item as the name of a cmdlet, function, script file, or runnable program.Please check the spelling of the name, and if the path is included, make sure the path is corr
DNS的解析流程
C language entry combat (13): decimal number to binary
zabbix邮件报警和微信报警
Redis(十一) - 异步优化秒杀
双重for循环案例(用js打印九九乘法表)
Differences between i++ and ++i in loops in C language
What is the most important ability of a programmer?
go里面的基本知识
Leetcode parentheses matching problem -- 32. The longest parentheses effectively
The installation of NPM, CNPM
深入剖析成员变量和局部变量的初始化问题
引领需求 为HR价值正名——“人力资源领先模型HRLM”成功首发