Ndm – A Desktop GUI Application For NPM
NPM, short for Node Package Manager, is a command line package manager for installing NodeJS packages, or modules. We already have have published a guide that described how to manage NodeJS packages using NPM. As you may noticed, managing NodeJS packages or modules using Npm is not a big deal. However, if you’re not compatible with CLI-way, there is a desktop GUI application named NDM which can be used for managing NodeJS applications/modules. NDM, stands for NPM Desktop Manager, is a free, open source graphical front-end for NPM that allows us to install, update, remove NodeJS packages via a simple graphical window.
In this brief tutorial, we are going to learn to use Ndm in Linux.
NDM is available in AUR, so you can install it using any AUR helpers on Arch Linux and its derivatives like Antergos and Manjaro Linux.
$ yay -S ndm
On RHEL based systems like CentOS, run the following command to install NDM.
$ echo "[fury] name=ndm repository baseurl=https://repo.fury.io/720kb/ enabled=1 gpgcheck=0" | sudo tee /etc/yum.repos.d/ndm.repo && sudo yum update &&
On Debian, Ubuntu, Linux Mint:
$ echo "deb [trusted=yes] https://apt.fury.io/720kb/ /" | sudo tee /etc/apt/sources.list.d/ndm.list && sudo apt-get update && sudo apt-get install ndm
NDM can also be installed using Linuxbrew. First, install Linuxbrew as described in the following link.
After installing Linuxbrew, you can install NDM using the following commands:
$ brew update
$ brew install ndm
On other Linux distributions, go to the NDM releases page, download the latest version, compile and install it yourself.
Launch NDM either from the Menu or using application launcher. This is how NDM’s default interface looks like.
From here, you can install NodeJS packages/modules either locally or globally.
Install NodeJS packages locally
To install a package locally, first choose project directory by clicking on the “Add projects” button from the Home screen and select the directory where you want to keep your project files. For example, I have chosen a directory named “demo” as my project directory.
Click on the project directory (i.e demo) and then, click Add packages button.
Type the package name you want to install and hit the Install button.
Once installed, the packages will be listed under the project’s directory. Simply click on the directory to view the list of installed packages locally.
Similarly, you can create separate project directories and install NodeJS modules in them. To view the list of installed modules on a project, click on the project directory, and you will the packages on the right side.
Install NodeJS packages globally
To install NodeJS packages globally, click on the Globals button on the left from the main interface. Then, click “Add packages” button, type the name of the package and hit “Install” button.
Click on any installed packages and you will see various options on the top, such as,
- Version (to view the installed version),
- Latest (to install latest available version),
- Update (to update the currently selected package),
- Uninstall (to remove the selected package) etc.
NDM has two more options namely “Update npm” which is used to update the node package manager to latest available version, and Doctor that runs a set of checks to ensure that your npm installation has what it needs to manage your packages/modules.
NDM makes the process of installing, updating, removing NodeJS packages easier! You don’t need to memorize the commands to perform those tasks. NDM lets us to do them all with a few mouse clicks via simple graphical window. For those who are lazy to type commands, NDM is perfect companion to manage NodeJS packages.