当前位置:网站首页>npm安装yarn
npm安装yarn
2022-04-23 07:20:00 【散落的流沙】
npm和yarn的区别:
1、速度区别
npm 按照队列执行每个 package,也就是说必须要等到当前 package 安装完成之后,才能继续后面的安装;
Yarn 同步执行所有任务,提高了性能。
2、安装版本区别
Yarn 默认会生成这样的锁定文件
npm 要通过 shrinkwrap 命令生成 npm-shrinkwrap.json 文件,只有当这个文件存在的时候,packages 版本信息才会被记录和更新。npm5.0之后新增了类似yarn.lock的 package-lock.json。
3、内容输出区别
npm 的输出信息比较冗长。在执行 npm install 的时候,命令行里会不断地打印出所有被安装上的依赖。
Yarn 简洁太多:默认情况下,结合了 emoji直观且直接地打印出必要的信息,也提供了一些命令供开发者查询额外的安装信息。
安装yarn流程
1、安装node.js(略过);
2、执行安装指令:
npm install -g yarn --registry=https://registry.npm.taobao.org
3、配置yarn源,修改为淘宝的源:
yarn config set registry https://registry.npm.taobao.org -g
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
注意:执行第三步时,如果提示‘yarn’不是内部或外部命令时,检查一下是否将yarn安装包路径添加到了系统的Path路径里了。
版权声明
本文为[散落的流沙]所创,转载请带上原文链接,感谢
https://blog.csdn.net/threelifeadv/article/details/108507244
边栏推荐
- Campus transfer second-hand market source code download
- 以下程序实现从字符串str中删除第i个字符开始的连续n个字
- redis主从服务器问题
- Discussion on ES6 tail tune optimization
- LeetCode简单题之计算字符串的数字和
- 谈谈那些基础但不简单的股票数据
- 万物互联下如何对设备进行加密
- Somme numérique de la chaîne de calcul pour un problème simple de leetcode
- Draw a circle quickly in MATLAB (the one that can be drawn directly given the coordinates and radius of the center of the circle)
- 通过实现参数解析器HandlerMethodArgumentResolver接口来自定义注解
猜你喜欢
vslam PPT
PyQt5开发之QTableWidget表头自定义与美化(附源代码下载)
Listed on the Shenzhen Stock Exchange: the market value is 5.2 billion yuan. Lu is the East and his daughter is American
简述存储器的分级策略
谈谈那些基础但不简单的股票数据
Rearranging log files for leetcode simple question
【解释】get ORA-12838: cannot read/modify an object after modifying it in parallel
2022.4.11-4.17 AI行业周刊(第93期):AI行业的困局
Comparison of indoor positioning methods of several intelligent robots
简述CPU
随机推荐
The whole house intelligence bet by the giant is driving the "self revolution" of Hisense, Huawei and Xiaomi
[effective go Chinese translation] part I
岛屿的个数
Listed on the Shenzhen Stock Exchange: the market value is 5.2 billion yuan. Lu is the East and his daughter is American
QFileDialog 选择多个文件或文件夹
【无标题】
編譯原理題-帶答案
【Appium】测试时遇到手机内嵌H5页面的切换问题
[Effective Go 中文翻译] 第一篇
LeetCode中等题之旋转函数
[go]常见的并发模型[泛型版]
Penetration test interview collection -- HVV---
[go] common concurrency model [generic version]
Positioning of high precision welding manipulator
智能名片小程序名片详情页功能实现关键代码
My heart's broken! A woman's circle of friends envied others for paying wages on time and was fired. Even her colleagues who liked her were fired together
Qt读取路径下所有文件或指定类型文件(含递归、判断是否为空、创建路径)
青苹果影视系统源码 影视聚合 影视导航 影视点播网站源码
Comparison of indoor positioning technology
dried food! Point based: differentiable Poisson solver