Node Package Manager
What is Npm ?
- Npm is the world’s largest Software Library (Registry).
- Npm is also a Software Package Manager and Installer.
World’s Largest Software
Registry (Library)
- Npm is the world’s largest Software Registry.
- The Registry contains over 800,000 code packages.
- Open-source developers use Npm to share Software.
- Many Organizations also use npm to manage private development.
Npm Is Free
Npm is free to use.
You can Download all Npm public software packages without any registration or login.
Command Line Client
Npm includes a CLI (command line client) That can be used to download and install software:
Installing npm
Npm is installed with Node.js
This means that you have to install Node.js to get npm installed on your computer.
Download Node.js from the official Node.js web site https://nodejs.org
Software Package Manager
The name npm (Node Package Manager) stems from when npm first was created as a package manager for Node.js
All npm package are defined in files called package.json.
The content of package.json must be written in JSON.
At least two fields must be present in the definition file: name and version
Managing Dependencies
Npm can manage dependencies
Npm can (in one command line) install all the dependencies of a project.
Dependencies are also defined in package.json.
Sharing Your Software
If you want to share your own software in the Npm registry, you can sign in at:
Publishing a Package
You can publish any directory from your computer as long as the directory has a package.json file.
Check if Npm is installed:
Check if you are logged in:
If not, log in:
Navigate to your project and publish your project: