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
相关推荐
JS_GGbond2 分钟前
用美食来理解JavaScript面向对象编程
开发语言·javascript·美食
苏打水com13 分钟前
第十六篇:Day46-48 前端安全进阶——从“漏洞防范”到“安全体系”(对标职场“攻防实战”需求)
前端·javascript·css·vue.js·html
猿究院_xyz2 小时前
微信小程序与echarts联动安卓真机测试出现黑色阴影
前端·javascript·微信小程序·小程序·echarts
刺客xs2 小时前
Qt-----QSS样式表
开发语言·javascript·qt
m0_740043732 小时前
3、Vuex-Axios-Element UI
前端·javascript·vue.js
阿蒙Amon2 小时前
JavaScript学习笔记:14.类型数组
javascript·笔记·学习
JS_GGbond2 小时前
给数组装上超能力:JavaScript数组方法趣味指南
前端·javascript
小邋遢2.02 小时前
vscod 执行npm build报错:Error: Cannot find module ‘vite‘
前端·npm·node.js
OLong2 小时前
this有且仅有的五种指法
javascript
是你的小橘呀2 小时前
新手入门 React 必备:电影榜单项目核心知识点全解析
前端·javascript