How To Install node-jsv on Ubuntu 18.04

In this tutorial we learn how to install node-jsv on Ubuntu 18.04. node-jsv is extendable, fully compliant JSON schema validator for NodeJS

Introduction

In this tutorial we learn how to install node-jsv on Ubuntu 18.04.

What is node-jsv

node-jsv is:

JSV is a JavaScript implementation of a extendable, fully compliant JSON schema validator. Its features are: with the following features:

  • complete implementation of all current JSON Schema draft revisions;
  • support for creating individual environments (sandboxes) that validate using a particular schema specification;
  • provides an intuitive API for creating new validating schema attributes, or whole new custom schema schemas;
  • supports self, full and describedby hyper links;
  • validates itself, and is bootstrapped from the JSON schema schemas;
  • works in all ECMAScript 3 environments, including all web browsers and Node.js.

There are three methods to install node-jsv on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install node-jsv Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install node-jsv using apt-get by running the following command:

sudo apt-get -y install node-jsv

Install node-jsv Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install node-jsv using apt by running the following command:

sudo apt -y install node-jsv

Install node-jsv Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install node-jsv using aptitude by running the following command:

sudo aptitude -y install node-jsv

How To Uninstall node-jsv on Ubuntu 18.04

To uninstall only the node-jsv package we can use the following command:

sudo apt-get remove node-jsv

Uninstall node-jsv And Its Dependencies

To uninstall node-jsv and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove node-jsv

Remove node-jsv Configurations and Data

To remove node-jsv configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge node-jsv

Remove node-jsv configuration, data, and all of its dependencies

We can use the following command to remove node-jsv configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge node-jsv

References

Summary

In this tutorial we learn how to install node-jsv package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.