yarn的安装和使用

windows mac 环境 yarn的安装和使用

yarn安装

cmd 复制代码
npm install -g yarn

yarn设置代理

cmd 复制代码
yarn config set registry https://registry.npm.taobao.org -g

yarn官方源

cmd 复制代码
yarn config set registry https://registry.yarnpkg.com

yarn使用

cmd 复制代码
// 查看板本
yarn --version

// 安装指定包
yarn add xxxxxx

// 安装所有包
yarn add  或 yarn install

// 更新指定包
yarn upgrade xxxxxx

// 删除指定包
yarn remove xxxxxx

国内镜像源

cmd 复制代码
yarn config set registry xxxxxx

// 淘宝镜像
https://registry.npm.taobao.org/

// 华为镜像
https://mirrors.huaweicloud.com/repository/npm/

yarn安装问题

yarn安装sass失败

设置 node-sass 地址

cmd 复制代码
// 阿里源
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

// 华为源
yarn config set sass_binary_site https://mirrors.huaweicloud.com/node-sass -g

// 安装 sass-loader node-sass
npm i sass-loader node-sass -D
相关推荐
RadiumAg2 小时前
记一道有趣的面试题
前端·javascript
yangzhi_emo2 小时前
ES6笔记2
开发语言·前端·javascript
yanlele2 小时前
我用爬虫抓取了 25 年 5 月掘金热门面试文章
前端·javascript·面试
烛阴3 小时前
void 0 的奥秘:解锁 JavaScript 中 undefined 的正确打开方式
前端·javascript
初遇你时动了情4 小时前
腾讯地图 vue3 使用 封装 地图组件
javascript·vue.js·腾讯地图
dssxyz4 小时前
uniapp打包微信小程序主包过大问题_uniapp 微信小程序时主包太大和vendor.js过大
javascript·微信小程序·uni-app
ohMyGod_1236 小时前
React16,17,18,19新特性更新对比
前端·javascript·react.js
@大迁世界6 小时前
第1章 React组件开发基础
前端·javascript·react.js·前端框架·ecmascript
一瓣橙子6 小时前
7.7日 实验03-Spark批处理开发(2)
开发语言·javascript·ajax
Hilaku6 小时前
从一个实战项目,看懂 `new DataTransfer()` 的三大妙用
前端·javascript·jquery