NPM Commands
Check for Outdated Packages
npm outdated
Displays a list of outdated packages with current, wanted, and latest versions
Check npm Version
npm --version
Displays the currently installed npm version
Deprecate Package
npm deprecate
Marks a package as deprecated with a warning message
Diagnose Issues
npm doctor
Runs a set of checks to identify potential issues in your environment
Initialize Project
npm init
Creates a new package.json file with project metadata
Install Dependencies
npm install
Installs all dependencies listed in package.json
Install Specific Package
npm install <package-name>
Installs a specific package and adds it to package.json
Start Project
npm start
Runs the "start" script defined in package.json
Start Project with Cache Reset
npm start -- --reset-cache
Starts the project and resets Metro bundler cache (often used in React Native)
Uninstall Package
npm uninstall <package_name>
Removes a specific package from node_modules and package.json
Update Global Packages
npm update -g
Updates all globally installed npm packages
Update Packages
npm update
Updates all dependencies to the latest allowed versions