This section offers selected information for Node.js development on SAP BTP, Cloud Foundry and references to more detailed sources.
You'll get information about the buildpack supported by SAP, the Node.js packages, and how to consume them in your application.
There is also a tutorial with an introduction to securing your application, and some tips and tricks for developing and running Node.js applications on SAP BTP, Cloud Foundry.
SAP BTP uses the standard Node.js buildpack provided by the Cloud Foundry community to deploy Node.js applications.
To get familiar with the buildpack and how to deploy applications with it, take a look at the Cloud Foundry Node.js Buildpack documentation.
You can download and consume SAP developed Node.js packages via the SAP NPM Registry. There is an overview of Node.js packages developed by SAP, what they are meant for, and where they are included in the SAP HANA Developer Guide for XS Advanced Model. See:
The SAP BTP, Cloud Foundry environment provides one recent version of the Node.js buildpack as part of its system buildpacks. To check this version:
-
Log in to a particular SAP BTP region and subaccount. Run:
cf api <SAP BTP region>
For example:
cf api https://api.cf.eu10.hana.ondemand.com
-
Then run:
cf buildpacks
To learn about changes in Node.js versions and features, regularly check the latest buildpack releases in the GitHub community page.
The nodejs_buildpack
running on SAP BTP, Cloud Foundry environment supports the following versions:
- Node.js 18
- Node.js 20
Node.js 14 reached end of life on April 30, 2023 and was removed from the Cloud Foundry community in version 1.8.10.
Node.js 16 reached end of life on September 11, 2023 and was removed from the Cloud Foundry community in version 1.8.15.
This means that deployment and redeployment of applications with Node.js 14 and 16 will fail. For more information, see:
We recommend that you migrate your applications to Node.js 18 or 20 as soon as possible.
Applications using XSJS are strongly impacted as the @sap/fibers library (on which @sap/xsjs depends) is not supported on Node.js 16 and later versions. To learn more, see: Migrating Applications from XSJS to Async-XSJS
In exceptional cases (if you haven’t completed the migration to Node.js 18), to avoid application failures during redeployment, you may pin the last buildpack version that contains Node.js 14 or 16, as provided by the nodejs-buildpack community. To learn how, see: Specify a buildpack version in manifest.yml
SAP does not recommend use of deprecated Node.js versions, as support and security fixes are no longer provided for them.
To see the latest news and updates about the Node.js system buildpack, regularly check the release notes on the What's New portal.
In May 2023, SAP migrated the root file system used in the Cloud Foundry environment in SAP BTP from the deprecated
cflinuxfs3
stack tocflinuxfs4
. If you are running Node.js applications on SAP BTP, Cloud Foundry using the Node.js buildpack, we recommend that you update and migrate your applications, as well as the Node.js buildpack. For more information about migration timelines, risks, and consequences, see:
If you encounter an issue while using the Node.js buildpack, you can:
-
Search for your problem in our Guided Answers: Node.js Buildpack
-
Create an incident for your specific problem, using support component BC-CP-CF-BLDP. To provide the necessary details, use the following template: Initial Problem-Related Data
The following tutorial will guide you through creating a Node.js application in Cloud Foundry Command Line Interface (cf CLI), consuming a Cloud Foundry service, and setting up authentication and authorization checks. See: Create an Application with Cloud Foundry Node.js Buildpack
For selected tips and tricks for your Node.js development, see Tips and Tricks for Node.js Applications.