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/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
Update the PATH
environment variable
Update the PATH
environment variable to include the npm
binary directory for installed CLI packages
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.
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:
And here you can see it working...
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.