The Paketo PHP buildpack doesn't include Node by default but you can provide the Paketo node-engine
buildpack to the build. Due to the way buildpacks work, we need another buildpack to "require" Node, so you'd also likely have to add the build-plan
buildpack to require Node.
Your build command would look like:
pack build my-app --buildpack paketo-buildpacks/php \
--buildpack paketo-buildpacks/node-engine \
--buildpack paketo-community/build-plan \
--builder paketobuildpacks/builder:full
Then, you'd need to add a "plan.toml" file to your app to require Node as mentioned above. The requires.metadata
section changes depending on whether you need Node during the build (build = true
) or at run-time (launch = true
):
[[requires]]
name = "node"
version = "<version constraint>"
[requires.metadata]
launch = true
If this is a common use case, we could think about potentially adding first-class support for Node to the PHP buildpack in the future. Feel free to open an issue on GitHub at https://github.com/paketo-buildpacks/php to discuss this further.