Below are the most common commands used in npm (Node Package Manager)

Install npm & dependencies

npm install

Install npm with the version

nvm install 12

Install Jest Global

npm install -g jest

Delete previous & new installation

rm -rf node_modules && npm install

Install SASS

npm install gulp gulp-sass sass --save-dev

Install Axios

npm install axios --save

Install package

npm i <package>

Uninstall package

npm un <package>

Remove node_modules and re-installing

rm -rf node_modules
rm -rf package-lock.json
npm install

Update package

npm up <package>

Global install package

npm list -g --depth=0

Uninstall a global package

npm -g uninstall <name> 

Upgrade npm


Categorized in:

Tagged in: