March 22

0 comments

Download Setup Node.JS on IBM i

By NickLitten

March 22, 2024

Node.JS

Download Setup Node.JS on IBM i

Following on from the previous blog, it’s time to use IBM i ACS to download and install Node.JS on our IBM i Power System.

To install Node.js on IBM i, you have a few options:

IBM i Node.js SDK

  • The IBM i Node.js SDK is a convenient way to get started. It bundles the Node.js SDK with other supported open-source packages.
  • You can download it as an RPM (Red Hat Package Manager) from the IBM i Node.js SDK download page.
  • This ensures that Node.js works seamlessly in your IBM i environment.

Node.js via PASE

PASE (Portable Application Solutions Environment) provides a runtime environment for open-source software on IBM i.

Ensure you’ve set up the open-source environment on your IBM i.

Then, follow these steps:

  • Install Node.js using ACS (Access for Client Solutions):
  • Open ACS.
  • Navigate to the “Available packages” tab.
  • Locate Node.js 20 and install it.

This will make Node.js available for development on your IBM i system.

I found the easiest way to install was using ACS – so do it with me.

Open IBM i ACS

Open ibm i acs - download setup node. Js on ibm i

To install open-source software on IBM i, you’ll need the appropriate authority and follow the right steps. Let’s break it down:

  1. IBM i Node.js SDK:
    • If you’re installing Node.js (or any other open-source package) using the IBM i Node.js SDK, you’ll need sufficient authority to install software on your system.
    • Ensure you have the necessary permissions to install RPM packages.
  2. PASE (Portable Application Solutions Environment):
    • When working with open-source software via PASE, you’ll need the following authority:
      • USE authority to the PASE environment.
      • OBJEXIST authority to the directories where you plan to install open-source packages.
      • EXECUTE authority on the installation scripts or commands.
    • Additionally, ensure you have the authority to create directories and files within the PASE environment.
  3. IBM i Access Client Solutions (ACS):
    • If you’re using ACS to manage open-source packages, you’ll need the necessary authority to:
      • Download software (such as RPM packages) using ACS.
      • Install the downloaded packages.
      • Update existing packages.
    • Ensure you have the appropriate permissions to perform these actions.
  4. Community Support:
    • For community-supported open-source projects (e.g., Node.js packages), you can raise defects or seek assistance on community channels like GitHub.
    • While IBM provides some level of free community support for specific integration pieces, it’s essential to engage with the relevant open-source community for assistance.

For more information on installing open-source packages, visit the IBM i RPM Packages page.

Launch IBM i ACS Open Source Package Management

Launch ibm i acs open source package management

Logon with a Profile with authority

Connct to your ibm i system using ssh

This will show you the list of installed packages on your system.

If you scroll down and find node.js is installed, then you are good to go. So, lets write and run a simple node.js helloworld application. If you dont find it… then read on.

Node. Js is installed on my ibm i system

If it is not installed then simply click the AVAILABLE PACKAGE heading and scroll down to find nodejs20:

You will see several different versions of node.js available for ibm i systems:

Different versions of node. Js available for ibm i systems

Let’s explore the differences between Node.js versions 14, 16, 18, and 20. Each of these versions brings its own set of features and improvements:

  1. Node.js 14 (LTS):
    • End-of-Life: Node.js 14 will go End-of-Life in April 2023.
    • Stability: It’s an LTS (Long-Term Support) version, which means it’s stable and well-supported.
    • Recommended for Production: Ideal for production environments where reliability is crucial.
    • Features: Node.js 14 introduced features like worker threads, V8 engine updates, and improved diagnostics.
    • Considerations: If you’re currently on Node.js 14, plan to upgrade to either Node.js 18 (LTS) or Node.js 20 (soon to be LTS).
  2. Node.js 16 (LTS):
    • End-of-Life: Node.js 16 will go End-of-Life in September 2023 (brought forward from April 2024 due to OpenSSL 1.1.1 support).
    • Stability: Another LTS version with stability and long-term support.
    • Features: Node.js 16 introduced ECMAScript modules (ESM), V8 updates, and performance improvements.
    • Use Cases: Suitable for applications that benefit from ESM and need long-term support.
  3. Node.js 18 (LTS):
    • Preferred LTS Version: As of now, Node.js 18.14.0 is the preferred LTS version.
    • Stability: Provides stability and long-term support.
    • Features: Node.js 18 includes enhancements like URL, fetch(), and EventTarget improvements.
    • Considerations: If you’re looking for a stable LTS version, Node.js 18 is a good choice.
  4. Node.js 20 (Current):
    • Not Yet LTS: Node.js 20 is the current release and will enter LTS in October.
    • Features: Node.js 20 introduces the Permission Model (restricting access to resources), synchronous import.meta.resolve, and other improvements.
    • Performance: Leverages V8 Fast API calls for better performance.
    • Evaluation: Explore the new features and evaluate their impact on your applications.

In summary, choose the LTS versions (14, 16, or 18) for production systems, and consider Node.js 20 for experimentation and feature exploration.

Life on the modern edge is fun.

Choose Node.js 2.0 🙂

Ibm i acs will launch yum to install node. Js

Enter a ‘Y’, sit back and sip your cup of tea (either ASSAM or EARL GRAY is acceptable) and watch Node.JS install on your IBM i System.

Download setup node. Js on ibm i

HUZZAH! node.js is installed on my IBM i System

What now?

Quickly test that Node.js works, using SSH or PASE.

Let’s do PASE because its quick and easy. QP2TERM is a program that starts a bash-like terminal. It is used to run an IBM i Portable Application Solutions Environment (IBM PASE for i). To launch the PASE interactive environment, you can call QP2TERM. Once inside PASE, you can run commands.

From an IBM i Command line call qp2term which will enter you into the PASE environment:

call qp2term

Now you can go through the steps to verify your PASE environment and also check that Node.JS is installed and running healthily:

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

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips

>