February 12, 2020 By Kazuki Nobutani 2 min read

Node-RED is an open source programming tool for wiring hardware devices and services on the Internet and APIs.

IBM Cloud offers a pre-configured Node-RED app kit on its Cloud Foundry (CF) space

There are times where users encounter underlying Node.js errors when launching the app due to internal changes. This post will outline how to modify pre-configured settings to resolve any errors you may encounter.

Error example

The application log shows the following error:

Unable to install node: no match found for 6.x in [8.16.0 8.16.1 10.16.0 10.16.3 12.7.0 12.8.1]”

This error indicates that the underlying Node.js version is outdated and cannot start the application. Therefore, restarting the application results in the same error.

Step 1: Enable the continuous delivery feature

First of all, you need to enable the continuous delivery feature. Continuous delivery allows you to store the source code of the Node-RED application on an IBM Git repository and modify its packages and other fields.

  1. Open your resource list.
  2. Open the application in question. Select the Overview tab from the left menu.
  3. Click the Enable icon under Continuous delivery.
  4. Define your repository information and input the API key.
  5. By default, the IBM Git repository and toolchain (code build and deployment) are included. You can create a new API key if you want.
  6. Once you define all values, click Create.

Step 2: Modify the underlying Node.js package

  1. Once continuous delivery creation completes, the toolchain is configured. Now, click Git under the CODE section. The IBM Git repository where the Node-RED code is stored will open.
  2. Open the package.json file in the root directory of the repository.
  3. Click Edit and modify the engine part of the code to the version supported.
    FROM:
     "engines": {
     "node": "6.x"
     }

    TO:

    "engines": {
     "node": "8.x"
     }
  4. Click Commit changes, which triggers the toolchain to automatically build and deploy your application:

Next steps

By following these steps, you’re now able to change the underlying Node.js version. The IBM Cloud platform evolves every day, so there is the chance that the version of Node.js you are running will become unsupported. If this happens, you can apply the same steps to overcome the problem. Also, enabling the continuous delivery feature allows you to customize your Node-RED. 

For more information on Node-RED, see their page on “Packaging.”

Node-RED is an open source program, so if you need more help, you can always contact community members by posting questions on the forum.

Was this article helpful?
YesNo

More from Cloud

Enhance your data security posture with a no-code approach to application-level encryption

4 min read - Data is the lifeblood of every organization. As your organization’s data footprint expands across the clouds and between your own business lines to drive value, it is essential to secure data at all stages of the cloud adoption and throughout the data lifecycle. While there are different mechanisms available to encrypt data throughout its lifecycle (in transit, at rest and in use), application-level encryption (ALE) provides an additional layer of protection by encrypting data at its source. ALE can enhance…

Attention new clients: exciting financial incentives for VMware Cloud Foundation on IBM Cloud

4 min read - New client specials: Get up to 50% off when you commit to a 1- or 3-year term contract on new VCF-as-a-Service offerings, plus an additional value of up to USD 200K in credits through 30 June 2025 when you migrate your VMware workloads to IBM Cloud®.1 Low starting prices: On-demand VCF-as-a-Service deployments begin under USD 200 per month.2 The IBM Cloud benefit: See the potential for a 201%3 return on investment (ROI) over 3 years with reduced downtime, cost and…

The history of the central processing unit (CPU)

10 min read - The central processing unit (CPU) is the computer’s brain. It handles the assignment and processing of tasks, in addition to functions that make a computer run. There’s no way to overstate the importance of the CPU to computing. Virtually all computer systems contain, at the least, some type of basic CPU. Regardless of whether they’re used in personal computers (PCs), laptops, tablets, smartphones or even in supercomputers whose output is so strong it must be measured in floating-point operations per…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters