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:
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.
update-alternatives --set node /QOpenSys/pkgs/lib/nodejs18/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
Update the PATH
environment variable
Update the PATH
environment variable to include the npm
binary directory for installed CLI packages
Place this updated path value in .bash_profile for CLI usage, put in .bashrc for Code for IBM i usage. Dotfiles – Hidden configuration files, usually found in one’s home directory, that are characterized by the dot at the beginning of the filename.
HINT: I update the value in my .profile file for my user profile to ensure it is updated each time I connect:
Verify Source Orbit is installed and accessible from VSCode
Just launch a PASE terminal, check the $PATH value (this is like a *LIBL in IBM i) and run SO to see what happens:
And here you can see it working...
I saw "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!
But let's dive into that little problem in the next lesson...