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
It seems like the --source flag in gcloud functions deploy can't be used with Typescript unless you copy over your package.json to the build output directory? This also seems to apply to the deploy cloud functions action.
This seems to be because the referenced source folder must also contain your package.json file. With Typescript, this is likely to be two different folders (ie. /build vs /).
I wanted to ensure this is expected behavior? If so, could the docs stress this? I spent a many hours figuring this out, as the cause of this problem wasn't immediately clear.
The text was updated successfully, but these errors were encountered:
It seems like the
--source
flag ingcloud functions deploy
can't be used with Typescript unless you copy over yourpackage.json
to the build output directory? This also seems to apply to thedeploy cloud functions
action.This seems to be because the referenced source folder must also contain your
package.json
file. With Typescript, this is likely to be two different folders (ie./build
vs/
).Thus, the only way to reference the cloud function source is in
main
ofpackage.json
like https://github.com/GoogleCloudPlatform/functions-framework-nodejs/blob/master/docs/typescript.md describes.I wanted to ensure this is expected behavior? If so, could the docs stress this? I spent a many hours figuring this out, as the cause of this problem wasn't immediately clear.
The text was updated successfully, but these errors were encountered: