Hướng dẫn cài đặt yarn trên MacOS

by Hieu Nguyen
2.7K views

Trong bài viết này tôi sẽ hướng dẫn các bạn cài đặt và sử dụng yarn để quản lý node packages thay cho npm

Cài đặt brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade

Cài đặt yarn

brew install yarn

Kiểm tra phiên bản yarn

hieunv@HieuNV ~ % yarn -v
1.22.0

Tạo mới node project bằng yarn

yarn init

Thêm dependencies

yarn add react

Thêm devDependencies

yarn add node-sass -D

Xoá dependencies hoặc devDependencies

yarn remove react

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

You may also like