Install Configure IBM i - Source Orbit

Installing Source Orbit on our IBM i System is fairly straightforward. Source Orbit is based on Node.JS so we need to follow these two easy steps:

  • IMPORTANT - read the official documentation before you do anything else... then..
  • Download and Install Node.JS (if not installed already). Once Node.JS is installed, we can use the Node Package Manager (npm) to install Source Orbit.
  • Download and Install Source Orbit

The Node Package Manager (npm) installer is a tool used to install packages for Node.js. It's a package manager for JavaScript, allowing developers to share and reuse code. It comes bundled with Node.js, so when you install Node.js, npm is installed automatically. npm provides a CLI to interact with the npm registry, where you can publish and install packages.

Lets take this one step at a time:

Install Node.js

Install Node.js via yum and/or use update-alternatives to set the Node.js version.

yum install nodejs20

update-alternatives --set node /QOpenSys/pkgs/lib/nodejs20/bin/node

If you prefer a graphical UI for the install, you can use IBM i ACS to install NodeJS rather than YUM. I use Nodejs20 on my machine, and it works great. So, feel free to use a new version of NodeJS if you want.

Install Source Orbit

Install Source Orbit globally on to the IBM i

npm i -g @ibm/sourceorbit

Update the PATH environment variable

Update the PATH environment variable to include the npm binary directory for installed CLI packages

# Add Binaries and NodeJS to end of path
PATH=$PATH:/QOpenSys/pkgs/bin:/QOpenSys/pkgs/lib/nodejs20/bin
export PATH PASE_PATH

Dotfiles – Hidden configuration files, usually found in one’s home directory, that are characterized by the dot at the beginning of the filename.

IMPORTANT

Place this updated path value in both .bash_profile for CLI usage and put in .bashrc for Code for IBM i usage. 

# Add Binaries and NodeJS to end of path
PATH=$PATH:/QOpenSys/pkgs/bin:/QOpenSys/pkgs/lib/nodejs20/bin
export PATH PASE_PATH
default paths for BASH in vscode with profile hidden file

Verify Source Orbit is installed and accessible from VSCode

Just launch a PASE terminal, at the same level as your IFS deployment folder, check the $PATH value (this is like a *LIBL in IBM i) and run SO to see what happens:

Install Configure IBM i - Source Orbit 1

And here you can see it working... 

source orbit working from shell in vscode

I say "working" because although we can see the SO command running it complains about a RPGLE program in my folder "/home/nicklitten/source" having the wrong extension!

As long as you get a reply back and/or no errors then Source Orbit is ready to go.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>