본문 바로가기
React/React Basic

NPM vs YARN 명령어 차이

by CodeMia 2022. 4. 18.

Install dependencies from package.json: 
npm install
yarn



Install a package and add to package.json: 
npm install package --save
yarn add package



Install a devDependency to package.json: 
npm install package --save-dev
yarn add package --dev



Remove a dependency from package.json: 
npm uninstall package --save
yarn remove package



Upgrade a package to its latest version: 
npm update --save
yarn upgrade
yarn upgrade react react-dom --latest 


Install a package globally: 
npm install package -g
yarn global add package





댓글