cloudfoundry / cli

The official command line client for Cloud Foundry
https://docs.cloudfoundry.org/cf-cli
Apache License 2.0
1.75k stars 927 forks source link

NodeJS not installed with a custom buildpack #1486

Closed johnwen84 closed 5 years ago

johnwen84 commented 5 years ago

Please fill out the issue checklist below and provide ALL the requested information.

Describe the bug and the command you saw an issue with I need to install some extra libraries for puppeteer to work with my NodeJS application. I created a custom buildpack in attempt to accomplish that. I added this to my yaml, buildpacks:

What happened My buildpack runs successfully, but NodeJS is not installed. The app fails with a npm not found error (The app command is npm start)

Expected behavior I expected that my app runs with my buildpack installing the libraries correctly

To Reproduce Steps to reproduce the behavior; include the exact CLI commands and verbose output:

  1. Run cf ...
  2. Bind a service cf bind-service
  3. See error

I also tried I tried to include this in the yaml file: buildpacks:

If I put this in the yaml file, buildpacks:

Provide more context

Note: As of January 2018, we no longer support API versions older than 2.69.0/3.4.0 (CF Release: 251 / CAPI Release: 1.15.0)

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/161508492

The labels on this github issue will be updated when the story is started.

johnwen84 commented 5 years ago

I have figured this out. I think I can do,

buildpacks:

and include the script that installs the libraries in supply instead of finalize in my buildpack.

My question now is that is it necessary to explicitly include nodejs-buildpack here? Or should the CLI automatically include it?

abbyachau commented 5 years ago

Hi @johnwen84 please if you could hop on to Slack at Cloud Foundry either at #cli or #buildpacks for these types of questions - that would be helpful. After trying with the aforementioned solution, please pop by either of those channels should you require additional help. Thanks.