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
相关推荐
速易达网络9 分钟前
Vue3 原生移动应用开发来了
前端·javascript·css
渣哥12 分钟前
别再乱用了!Spring AOP 与 AspectJ 的区别比你想的复杂
javascript·后端·面试
GISer_Jing12 分钟前
LLM对话框项目技术栈&重难点总结
前端·ai·node.js
患得患失94918 分钟前
【Turborepo】【Next】 Turborepo + Next.js 前后端精简搭建笔记(带官网)
开发语言·javascript·笔记
小谭鸡米花34 分钟前
高德地图电子围栏/地图选区/地图打点
前端·javascript·vue.js
西瓜树枝1 小时前
解决 JS 大整数精度丢失?一文读懂 BigInt 的底层逻辑与实战规则
前端·javascript
刺客_Andy1 小时前
React 第四十六节 Router中useInRouterContext的使用详细介绍及注意事项
前端·javascript·react.js
刺客_Andy1 小时前
React 第四十四节Router中 usefetcher的使用详解及注意事项
前端·javascript·react.js
刺客_Andy1 小时前
React 第四十五节 Router 中 useHref() Hook的使用详解及注意事项
前端·javascript·react.js
好好好明天会更好1 小时前
Vue2中页面数据响应的问题
前端·javascript·vue.js