An Enthusiastic Programmer

General React Package Management Commands

|

Here will demonstrate to you the package management commands. The official standard command is through npm, but some guys use yarn. Both are fine, and frequently used.

All packages divided into local and global. They are separated. global packages are for general packages, such as create-react-app, yarn, sass etc…

npm

install packages

npm install <package_name>

install packages globally

npm install -g <package_name>

list local pacakages

npm list

list global pacakages

npm list -g

yarn

install packages

yarn add <package_name>
yarn global add <package_name>

list local pacakages

npm list

list global pacakages

yarn global list

Comments