
You can check which npm packages in your project or system have updates available by running this command from the root directory: npm outdated To keep your code and tools secure and stable, regularly update local and global packages downloaded from the npm registry.īefore updating any npm package, check whether any of them are outdated. In case you want to install an npm package to be used from the command line, enter either of the following commands: npm install -globalīe sure to replace the with the module name.

Here is an example of what a package.json file contains: Installing a Module Globally on Your System That’s why it’s essential to include package.json before publishing projects on the npm registry. The package.json file simplifies identifying, managing, and installing a package. It contains the metadata of npm projects or packages, such as package versions and contributors.



It comes bundled with node.js, an open-source server environment. Node package manager (npm) is one of the largest software registries in the world.
