0

I am using Cloud Foundry's nodejs profile and my nodejs package.json requires chartjs-node-canvas. That package uses node-canvas and node-canvas is based on Cairo. The node-canvas site says I have to add the cairo-devel package to Linux (apt-get) in order for canvas to be installed.

Is it possible to add software to the OS image running on cloud foundry? If so, how?

Joe Herman
  • 21
  • 4

1 Answers1

0

You can do that by vendoring the dependencies. When you vendor them, you'll build locally in an Ubuntu Bionic Linux container or VM. Node will build everything that's required and you will no longer need the cairo-devel package (it's only needed to build).

The process to vendor dependencies is documented here.

The other option is to use the Apt Buildpack which is described on this SO post. That can be used to install any apt packages.

Daniel Mikusa
  • 13,716
  • 1
  • 22
  • 28