npm init
1
npm init # Create package.json file
Install all packages
1
npm install
Install packages individually
1
2
3
4
npm install [package] --save
npm install [package]@[version] --save # Install a specific version
npm install [package-name] --save-dev # Adding to devDependencies
npm install -g [package] # Add global
Update package
1
npm update [-g] [package]
Delete Package
1
2
npm uninstall [package]
npm uninstall [package] --save # Delete from package.json only
Show package list
1
npm list