Skip to content
Related Articles

Related Articles

15 npm Commands that Every Node Developer Should Know
  • Last Updated : 01 Feb, 2021

NPM stands for Node Package Manager and it is the package manager for the Node JavaScript platform. It put modules in place so that node can find them, and manages dependency conflicts intelligently. Most commonly, it is used to publish, discover, install, and develop node programs.

Some Important npm commands every developer should know are:

  1. NPM Install Command: Installs a package in the package.json file in the local node_modules folder.

    npm install
  2. NPM Uninstall Command: Remove a package from the package.json file and removes the module from the local node_modules folder.

    npm uninstall 
  3. NPM Update Command: This command updates the specified package. If no package is specified then it updates all the packages in the specified location.

    npm update 
  4. NPM Global Update Command: This command will apply the update action to each globally installed package.

    npm update -g
  5. NPM Deprecate Command: This command will deprecate the npm registry for a package, providing a deprecation warning to all who attempt to install it.

    npm deprecate
  6. NPM Outdated Command: Checks the registry if any (or specified) package is outdated. It prints a list of all packages which are outdated.

    npm outdated
  7. NPM Doctor Command: Checks our environment so that our npm installation has what it needs to manage our JavaScript packages.

    npm doctor
  8. NPM Initialize Command: Creates a package.json file in our directory. It basically asks some questions and finally creates a package.json file in the current project directory.

    npm init
  9. NPM Start Command: Runs a command that is defined in the start property in the scripts. If not defined it will run the node server.js command.

    npm start
  10. NPM Build Command: It is used to build a package.

    npm build
  11. NPM List Command: Lists all the packages as well as their dependencies installed.

    npm ls
  12. NPM Version Command: Bumps a package version.

    npm verison
  13. NPM Search Command: Searches the npm registry for packages matching the search terms.

    npm search
  14. NPM Help Command: Searches npm help documentation for a specified topic. It is used whenever the user needs help to get some reference.

    npm help
  15. NPM Owner Command: Manages ownership of published packages. It is used to manage package owners.

    npm owner
My Personal Notes arrow_drop_up
Recommended Articles
Page :