## 4.1.3.5.2 Developing Node.js in the Cloud Foundry Environment
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.
## Node.js Community Buildpack
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 .
## SAP Node.js Packages
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:
- Download and Consume SAP Node.js Packages
- Standard Node.js Packages
- The SAP NPM Registry
## Buildpack Versioning
The SAP BTP, Cloud Foundry environment provides one recent version of nodejs\_buildpack as part of its system buildpacks. To check this version, proceed as follows:
1. Log in to a particular SAP BTP region and subaccount. For example, if your region is eu10 , run:
2. Then run:
```
cf api https://api.cf.eu10.hana.ondemand.com
```
```
cf buildpacks
```
To learn about changes in the Node.js buildpack's versions and features, regularly check the latest buildpack releases in the GitHub community page.
## Usage
To use this buildpack, specify its name when deploying a Node.js application to the SAP BTP, Cloud Foundry environment. You can do it the following ways:
- Specify it directly in the cf push command:
- Specify it in the manifest.yml file of your application by using the buildpacks attribute:
```
cf push -f <PATH_TO_APP_MANIFEST> -b nodejs_buildpack
```
```
---applications: - name: <APP_NAME> memory: 512M buildpacks: - nodejs_buildpack ...
```
Then, you can deploy the application like this:
```
cf push <app_name>
```
- Specify it in the mtad.yaml deployment descriptor file (for multi-target applications) by using the buildpack attribute:
```
... modules: - name: <APP_NAME> type: nodejs path: <path_to_archive> properties: ... parameters: ... memory: 512M buildpack: nodejs_buildpack ...
```
Then, you can deploy the application like this:
```
cf push <app_name>
```
## Supported Versions
The nodejs\_buildpack running on SAP BTP, Cloud Foundry environment supports the following versions:
- Node.js 18 - this version has reached end of life on April 30, 2025. See section Deprecated Versions .
- Node.js 20
- Node.js 22
- Node.js 24
## Deprecated Versions
## Node.js 18
Node.js 18 has reached end of life on April 30, 2025 according to the Node.js Roadmap . It's still available but will soon be removed from the SAP BTP, Cloud Foundry environment. When this version disappears, deployment and redeployment of Cloud Foundry applications running on Node.js 18 will fail.
Action: We strongly recommend that you migrate your applications to Node.js 20 or 22 as soon as possible.
In exceptional cases (if you haven't managed to switch to Node.js 20 in time), to avoid application failures during redeployment, you can pin the last buildpack version that contains Node.js 18, as provided by the nodejs-buildpack community. To learn how, see: Specify a buildpack version in manifest.yml [page 376]
If you are using MTA deployment descriptors, in your mtad.yaml file you need to define module type javascript.nodejs and set parameter buildpack to nodejs\_buildpack . For example:
```
modules: - name: myapp type: javascript.nodejs parameters: buildpack: nodejs_buildpack
```
If you want to pin a particular buildpack version (for example, 1.8.34 ), you can do it the following way:
```
modules: - name: myapp type: javascript.nodejs parameters: buildpack: https://github.com/cloudfoundry/nodejs-buildpack.git#v1.8.34
```
To learn more, see MTA Module Types.
## Node.js 16
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 running on Node.js 16 will fail . For more information, see: Node.js Roadmap
##  Note
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 [page 369]
In exceptional cases (if you didn't manage to migrate to Node.js 18 or 20 in time), to avoid application failures during redeployment, you can pin the last buildpack version that contains Node.js 16, as provided by the nodejs-buildpack community. To learn how, see: Specify a buildpack version in manifest.yml [page 376]
##  Remember
SAP does not recommend use of deprecated Node.js versions, as support and security fixes are no longer provided for them.
## What's New
To check the latest news and updates about the Node.js buildpack, go to its release notes: What's New for Node.js Buildpack
##  Note
In May 2023, SAP migrated the root file system used in the Cloud Foundry environment in SAP BTP from the deprecated cflinuxfs3 stack to cflinuxfs4 . 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:
- Deprecation of Cloud Foundry Stack cflinuxfs3 and Migration to cflinuxfs4
- What's New: cflinuxfs4 becomes the default stack
## Troubleshooting
If you encounter an issue while using the Node.js buildpack, you can:
- Search for your problem in our Troubleshooting [page 385] section.
- Create an incident for your specific problem, using support component BC-CP-CF-BLDP . T o provide the necessary details, use the following template: Initial Problem-Related Data [page 383]
## Node.js Tutorial
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
## Tips and Tricks
For selected tips and tricks for your Node.js development, see Tips and Tricks for Node.js Applications [page 374].