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
相关推荐
左夕3 分钟前
分不清apply,bind,call?看这篇文章就够了
前端·javascript
滕青山1 小时前
文本行过滤/筛选 在线工具核心JS实现
前端·javascript·vue.js
时光不负努力1 小时前
编程常用模式集合
前端·javascript·typescript
Gogo11211 小时前
构建高性能 Node.js 集中式日志体系 (下篇):Pino + PM2 + OpenSearch 代码落地实战
node.js
大雨还洅下1 小时前
前端JS: 跨域解决
javascript
小岛前端1 小时前
Node.js 宣布重大调整,运行十年的规则要改了!
前端·node.js
OpenTiny社区1 小时前
OpenTiny NEXT-SDK 重磅发布:四步把你的前端应用变成智能应用
前端·javascript·ai编程
梦想CAD控件1 小时前
在线CAD开发包结构与功能说明
前端·javascript·vue.js
时光不负努力1 小时前
TS 常用工具类型
前端·javascript·typescript
Hilaku2 小时前
我会如何考核一个在简历里大谈 AI 提效的高级前端?
前端·javascript·面试