Verify Node.js Environment on IBM i
Overview
Node.js runs in the PASE environment on IBM i, like many other open source technologies. The steps on this page verify that Node.js has been installed correctly and that the version you expect is the one in use.
Depending on how you start your PASE environment, you may have to set the PATH and select your version each time. If a command fails, confirm that all of the preceding steps have been completed.
Step 1: Starting a PASE Environment
A PASE session can be started on an IBM i from a 5250 session with the following command:
CALL QP2TERMAlternatively, you can start a terminal session through Git Bash, PowerShell, PuTTY, or a similar PC client. These require that your IBM i has SSH set up. For details on setting up SSH on IBM i, see https://wiki.midrange.com/index.php/SSH.
Step 2: Add the Open Source Installation Directory to PATH
Open source packages are installed into /QOpenSys/pkgs/bin on an IBM i. If it has not been done already, add that directory to your PATH environment variable:
PATH=/QOpenSys/pkgs/bin:$PATH
export PATHStep 3: Selecting the Node.js Version
This option should only be used to change the Node.js version for the system as a whole. To set the Node.js version on a per-user or per-instance basis, see Installing Node.js for IBM i.
The following command sets the system-wide Node.js version for your system:
alternatives --config nodeYou should get a prompt like the one shown below. Enter the number corresponding to the Node.js version you want to use and press Enter:
Step 4: Checking the Version of Node.js
The following command verifies that Node.js is running properly and that the installed or selected version is the one currently in use:
node -vThis produces output showing the version currently in use:
Compare the version shown here against the Node.js versions supported by the Profound.js release you plan to install (see Profound.js Prerequisites).