This content originally appeared on DEV Community and was authored by vandna kapoor
Here is a quick reference guide for basic commands that we can use when dealing with Node and requiring the use of NPM or YARN.
- 
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
 
- 
Install a package globally:npm install package -g == yarn global add package
 
This content originally appeared on DEV Community and was authored by vandna kapoor
 
	
			vandna kapoor | Sciencx (2021-11-24T21:16:05+00:00) NPM vs. YARN: Basic Commands. Retrieved from https://www.scien.cx/2021/11/24/npm-vs-yarn-basic-commands/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.
