buildpacks icon indicating copy to clipboard operation
buildpacks copied to clipboard

Be able to add cli options to npm install

Open jlopezxs opened this issue 11 months ago • 2 comments

Is your feature request related to a problem? Please describe. I'm trying to improve some build time and trying to add --cache .npm --prefer-offline --no-audit to the npm install script. Checking the code I didn't see how to do that: https://github.com/GoogleCloudPlatform/buildpacks/blob/main/cmd/nodejs/npm/main.go#L120

Describe the solution you'd like Maybe like gcp-build could exists a gcp-install or a ENV variable to add some configuration in the installation step

Describe alternatives you've considered I'm open to any workaround to test it. If there are another env or some configuration that not affects to all the application infrastructure like move from App Engine to Cloud Run or Flex with custom docker image.

jlopezxs avatar Mar 12 '24 10:03 jlopezxs

Hey @jlopezxs , would GOOGLE_NODE_RUN_SCRIPTS help? https://cloud.google.com/docs/buildpacks/nodejs#using_google_node_run_scripts

jama22 avatar Apr 25 '24 18:04 jama22