This topic provides a migration guide from the v2 Node.js Buildpack for Tanzu Application Service for VMs to the Tanzu Node.js Buildpack. By following this guide, you can migrate your existing Node.js applications running on Tanzu Application Service for VMs to Tanzu Application Service for Kubernetes or Tanzu Build Service.
The v2 Node.js Buildpack bundled a number of third-party integrations with partner utilities including Appdynamics, Contrast Security, Dynatrace, New Relic, Synopsys, and Snyk. The v3 Node.js Language Family Buildpack also includes a number of partner integrations. Each is implemented as an optional buildpack. See the Nodejs Release Notes for a list of included partner integration buildpacks.
Define a buildpack.yml
file in your application's source code to specify a version of the Node.js engine as follows:
nodejs:
# Use the version field to specify a version
# for the Node.js dependency. Any valid semver constraint
# (e.g. 1.2.*) is acceptable.
version: 14.*
Define a buildpack.yml
file in your application's source code to optimize memory usage as follows:
nodejs:
# Use the optimize-memory field to configure Node.js to
# optimize memory usage based on your system constraints.
# Only boolean values (true/false) are acceptable.
optimize-memory: true
node_modules
or npm-cache
directory. In that case, those directories will serve as vendored locations for dependencies and the installation process will look there to satisfy their requirements.npm list
before pushing your application.The following workflows are not currently supported in the Tanzu Node.js Buildpack:
package.json
is not currently supported. The buildpack will provide the version of NPM that comes with the specified version of the Node.js engine.package.json
is not currently supported.The following workflows existed in the v2 Node.js Buildpack and will not be supported in the Tanzu Node.js Buildpack:
heroku-prebuild
and heroku-postbuild
in package.json are not supported in the Tanzu Node.js Buildpack. You should use the standard prestart
and poststart
hooks instead.