This page provides solutions on known issues related to the Node.js buildpack.
If you can't find a solution to your problem, create an incident to component BC-CP-CF-BLDP
.
Node.js 16 reached end of life on September 11, 2023 (instead of April 2024, as originally planned), and shortly after was removed from the community buildpack. This means that, after this date, deployment and redeployment of applications running on Node.js 16 would fail. For more information, see:
To avoid such issues, please migrate to Node.js 18 or higher as soon as possible!
In exceptional cases (if you haven’t managed to switch to Node.js 18 or 20 yet), 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 to do this, see: Specify a buildpack version in manifest.yml
Nevertheless, this approach can only be used as a temporary solution, until you complete migration to a later version of Node.js!
SAP does not recommend use of deprecated Node.js versions, as support and security fixes are no longer provided for them.
You have an XSJS application, which was working fine on Node.js 14.
After an upgrade to Node 16, it fails to rebuild or redeploy and is no longer working. In the logs, you see the following error messages:
npm ERR! gyp ERR! command "/opt/nodejs/node-v16.15.0-linux-x64/bin/node"
"/home/user/.node_modules_global/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"npm ERR! gyp ERR! cwd /home/user/projects/DataCentral/dc_node/node_modules/@sap/xsjs/node_modules/@sap/fibers
You may also encounter the following error messages:
npm WARN EBADENGINE required: { node: '^10 || ^12 || ^14' },
npm WARN EBADENGINE current: { node: 'v16.19.0', npm: '8.19.3' }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@sap/[email protected]'
XSJS applications use the @sap/fibers library (on which the @sap/xsjs package depends), which is not supported on Node.js 16 and later versions.
To keep your XSJS applications up and running on latest Node.js versions, you need to migrate them to the new XSJS layer with an asynchronous API. To learn how to do this, see:
Bear in mind that Node.js 14 was removed from the community buildpack on April 30, 2023.
We recommend migration to Node.js 18 or 20, and respectively migration to Async-XSJS, as soon as possible.
In exceptional cases (if you haven’t managed to complete the migration to Async-XSJS), to avoid application failures during redeployment, you can pin the last buildpack version that contains Node.js 14, as provided by the nodejs-buildpack community. To learn how to do this, see: Specify a buildpack version in manifest.yml
Nevertheless, this approach can only be used as a temporary solution, until you complete the migration!
SAP does not recommend use of deprecated Node.js versions, as support and security fixes are no longer provided for them.