You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploying from local source with gcloud functions deploy seems unable to include local file dependencies.
When setting --set-build-env-vars GOOGLE_VENDOR_NPM_DEPENDENCIES=true and package.json is referencing something like "app-common": "file:./localpath" builds fail and throw the following build error:
If I try the gcloud functions deploy command minus the build env var, it pushes an image to the cloud function that is missing dependencies. It would be great if this could deploy from local source in one step and have it correctly include dependencies, instead of manually having to build a docker image and push.
The text was updated successfully, but these errors were encountered:
The example is just exporting a string to reproduce the error, but my actual use case is that I'm including a /dist folder that is built by a nested dependency which I'm including at root inside my local source.
I'd love to be able to deploy directly with glcoud function deploy but instead I'm having to build the docker container manually with pack then push that to artifact registry, and then deploy a new revision from CloudRun.
Deploying from local source with
gcloud functions deploy
seems unable to include local file dependencies.When setting
--set-build-env-vars GOOGLE_VENDOR_NPM_DEPENDENCIES=true
andpackage.json
is referencing something like"app-common": "file:./localpath"
builds fail and throw the following build error:Was expecting this should work:
But I was able to work around by building a docker image locally and manually pushing:
If I try the
gcloud functions deploy
command minus the build env var, it pushes an image to the cloud function that is missing dependencies. It would be great if this could deploy from local source in one step and have it correctly include dependencies, instead of manually having to build a docker image and push.The text was updated successfully, but these errors were encountered: