If you installed yum as per a previous blog post then installing node.js to your IBM i is a cinch.
- Open a PASE shell via the command line
- Install node.js 10 – you can install multiple versions in parallel
yum install nodejs10
- To allow you to call the node commands from your directories, add the open source command directory to your PATH environment variable
PATH=/QOpenSys/pkgs/bin:$PATH export PATH
- Verify the commands now work by checking the version you installed
- If you have multiple versions of node.js installed you can use the following command to select which one will be active