npm is a node package manager
Commands
| npm install <package-name> npm i npm i <package> -g | isntall dependencies -g: install the package globally pacakge@version: to install a specific package version |
| npm help <command> | get command help ex: npm help install |
| npm –version npm -v | get npm version |
| npm init npm init -y | init a folder to create a package.json file -y use the default options |
| npm list npm list –depth <number-of-level> npm list –depth <level> –dev (or –prod or –parseable) npm ls | list packages in a project ex: npm list –depth 2 |
| npm list -g | list the packages you have installed globally |
| npm uninstall <package-name> npm rm or nom un or npm r | uninstall a library –global: to uninstall the library globally |
| npm update | update your libraries |
| npm config npm get npm set | setting defaults |
Leave a comment