Pre-requirements of Installation

The pre-requirements for installing and using the modules of NGSI JavaScript Library are the following:

Node.js and npm

The installation of Node.js can be through an executable installer or downloading the source code; this choice depends directly on the operating system where it will be installing. You can find the download files and the spets for Node.js installation in the official download link. The current version of Node.js is 10.13.0, this version includes npm in its version 6.4.1. The installation of both modules of the NGSI JavaScript library requires the previous installation of the following versions of node.js and npm.

  • node.js >= 8.x.x (in version 8.0.0 or higher)
  • npm >= 5.x.x (in version 5.0.0 or higher)

You can execute the following commands in console for verifying the version of Node.js and npm that you have installed in your operating system.

  • node -v
  • npm -v

Yarn (optional)

Yarn is a package manager for node packages. You can use this manager instead of npm, if you prefer to install the NSGI Library modules with this package manager. The instructions for installing Yarn are described in the official site of Yarn

NGSI JavaScript Library Installation

NGSI - parser module installation

You can install the ngsi-parser module through one of the following lines of code:

Using npm:

    npm install ngsi-parser 

Using yarn:

    yarn add ngsi-parser

OCB - sender module installation

You can install the ocb-sender module through one of the following lines of code:

Using npm:

   npm install ocb-sender

Using yarn:

    yarn add ocb-sender