Troubleshooting Node.js App Staging Failures on Stack 4 in Tanzu Application Service
search cancel

Troubleshooting Node.js App Staging Failures on Stack 4 in Tanzu Application Service

book

Article ID: 400957

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

You may encounter application startup failures when using the Node.js buildpack with the cflinuxfs4 stack, accompanied by the following error:

**ERROR** Unable to install node: no match found for 16.x.x in [18.20.3 18.20.4 20.16.0 20.18.0 22.8.0 22.11.0]

Cause

The failure could occur if your package.json specifies a Node.js version that is not supported by the Node.js buildpack in use.

If you run cf logs <app-name> you would observe below errors:

 engines.node (package.json): 16.x.x^M   engines.npm (package.json): unspecified (use default)^M   **ERROR** Unable to install node: no match found for 16.x.x in [18.20.3 18.20.4 20.16.0 20.18.0 22.8.0 22.11.0]^M   Failed to compile droplet: Failed to run all supply scripts: exit status 14^M

Resolution

To resolve this issue, either update your package.json to specify Node.js version 18.x or higher, or create a custom buildpack that includes Node.js 16.x. The recommended approach is to align your package.json with the Node.js version bundled in the buildpack you are using.