December 8, 2018 By Carlos Santana 2 min read

What’s happening with IBM Cloud Functions and Node.js?

I’m excited to announce that IBM Cloud Functions officially supports the latest version of Node.js. Last week, a new version of Node.js was released that included security updates, new features, and performance improvements. You can see the full release notes for version 10.x before we offered long-term support to view notable addition and deprecation details, or you can see the break down in the blog post: NodeJS 10: The New, The Changed, and the Deprecated.

Temporary limitations

  • The watson-developer-cloud npm package is not embedded into the nodejs:10 runtime . When the major version (4.0.0) is released, the watson-developer-cloud is added. You can track the progress through this GitHub issue.

  • The ibm_db npm package is not available for nodejs:10 at this time and is currently unsupported. You can track the progress through this GitHub issue.

Node.js supports the latest JavaScript specifications, such as arrow functions, async, await, and many others. Check out what’s been updated here: https://node.green/

Ready to try it out?

You can deploy this example action by using the IBM Cloud CLI. Console UI support for Node.js 10 is coming soon.

Here is a simple hello world action:

const main = (params) => {
let body = `Hello ${params.name || 'World'}`
let res = {body}
return res
}

To create a web action with the IBM Cloud Functions CLI plugin, run the following command:

ibmcloud fn action update helloNodejs10 helloNodejs10.js --kind nodejs:10 --web true
Note: As a best practice, when using the CLI, always specify the kind to be sure that you are using the expected version of the language. Example: --kind nodejs:10

To get the URL for the web action and open it in your browser, run the following command:

ibmcloud fn action get helloNodejs10 --url

Node.js version 6: Deprecated, EOL April 2019

As part of this update, version 6 is being deprecated. According to the Node.js Foundation release schedule, end of life for version 6 is April 2019. This means that IBM Cloud Functions can no longer support version 6. Any functions that are tagged with kind nodejs:6 will no longer be invoked. To make the transition as smooth as possible, we recommend that you start migrating as soon as possible and begin using kind nodejs:10 in any new Node.js functions that you create.

Node.js version 8: Decreased maintenance, January 2019

At the start of the new year, version 8 will move from active long-term service to maintenance mode. This means that version 8 will no longer be able to be received by back ports, and the Node.js community will focus their efforts on keeping version 10 up to date. You can follow progress and see updates through GitHub issues. Again, to make this transition as smooth as possible, we recommend that you start migrating as soon as possible and begin using kind nodejs:10 in any new Node.js functions that you create.

How do I learn more?

You can learn more about the service and creating actions in the IBM Cloud Functions documentation.

More from Announcements

Success and recognition of IBM offerings in G2 Summer Reports  

2 min read - IBM offerings were featured in over 1,365 unique G2 reports, earning over 230 Leader badges across various categories.   This recognition is important to showcase our leading products and also to provide the unbiased validation our buyers seek. According to the 2024 G2 Software Buyer Behavior Report, “When researching software, buyers are most likely to trust information from people with similar roles and challenges, and they value transparency above other factors.”  With over 90 million visitors each year and hosting more than 2.6…

IBM named a Leader in Gartner Magic Quadrant for SIEM, for the 14th consecutive time

3 min read - Security operations is getting more complex and inefficient with too many tools, too much data and simply too much to do. According to a study done by IBM, SOC team members are only able to handle half of the alerts that they should be reviewing in a typical workday. This potentially leads to missing the important alerts that are critical to an organization's security. Thus, choosing the right SIEM solution can be transformative for security teams, helping them manage alerts…

IBM Consulting augments expertise with AWS Competencies: A win-win for clients 

3 min read - In today's dynamic economic landscape, businesses demand continuous innovation and speed of execution. At IBM Consulting®, our unwavering focus on partnerships and shared commitment to delivering enterprise-level solutions to mutual clients have been core to our success.   We are thrilled to announce that IBM® has recently gained five competencies from Amazon Web Services (AWS) in vital domains including Cloud Operations, Internet of Things (IoT), Life Sciences, Mainframe Modernization, and Telecommunications. With these credentials, IBM further establishes its position as a…

IBM Newsletters

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