Setting up the development environment

The IBM® Cognos Analytics custom visualizations CLI tools require you to install the NodeJS runtime environment with a NodeJS package manager (NPM).

Before you begin

Make sure that the following software is installed:
  • Microsoft Windows PowerShell or CMD on Windows or Terminal on Apple OSX.
  • NodeJS version 10. For more information, see https://nodejs.org/en/.

Check the setup of your npm registry:

Note: Your npm registry can be public or private.
  • If you are using a public npm registry, you must have access to the internet. This is the recommended option.
  • If you are using a private npm registry, refer to the npm documentation for instructions on pointing your Node.js project at a private registry.

    To use Appsody Node.js stacks in an air gap environment, your private npm registry must contain all the dependent npm modules that are used in the stack. You can discover the list of first-level dependencies in the package.json file in the stack definition. Alternatively, you can run npm ls or inspect the package-lock.json file in an initialized project to see the full list of npm dependencies. Follow your organization's standard procedures for copying npm modules into your private registry.

Procedure

Installing Node.JS and NPM

  1. Download NodeJS version 10 installer from https://nodejs.org/en/download/.
  2. Run the installer and use the default settings.
  3. After the installation, restart your computer.
  4. Validate the node and npm installation.
    1. Open a command-line interface (CLI). Powershell or CMD on Windows or Terminal on OSX.
    2. Run the following command:
      node --version
      The CLI displays the current version of the node. Make sure it meets the prerequisites.

Installing the Cognos Analytics custom visualizations CLI tools

  1. Download the Cognos Analytics custom visualizations command-line tools from the following location:
    • For Cognos Analytics 11.1.4, use [CAserverroot]/bi/js/dashboard-analytics/lib/@waca/vida/sdk/customvis.tgz.
    • For Cognos Analytics 11.1.5, use [CAserverroot]/bi/js/vida/customvis.tgz.
    In some browsers, the file extension .tgz is recognized as text. Download the file by right-clicking the link and choose Save as and set type to All Files. Do not use the Mozilla Firefox browser to download the file.
  2. In your file browser, navigate to the directory where the downloaded file is saved to.
  3. Open a command-line tool.
    • On Microsoft Windows systems Windows PowerShell or CMD.
    • On Apple OSX systems Terminal.
  4. Run the following command:
    npm install -g customvis.tgz
    On UNIX and Apple OSX systems, you might get a permission denied error. To solve this error, run the following command as an administrator:
    sudo npm install -g customvis.tgz
    The custom visualizations CLI tools are installed on your system.
  5. After the process is completed, run the following command to validate the custom visualizations CLI tools.
    customvis --help
    The CLI displays the available commands.
  6. In your file browser, delete the file customvis.tgz.