Recently our ability to deploy our functions, both in our dev and prod projects, ceased. When I attempt to deploy any function, or, via cloudbuild trigger, deploy all functions, I get an error:
Build failed: > functions@0.1.0 build > yarn build-deps && tsc sh: 1: yarn: not found; Error ID: 1a2262f3
functions@0.1.0 is the package in our repo. yarn build-deps && tsc is our package.json script called "build" .
Hello @cdiddy77 ,
Welcome to Google Cloud Community!
Yarn is used if your project includes a yarn.lock file.
Npm run build is run in default whenever a script is specified inside the package.json file. You can override this and only run your preferred scripts using custom build steps. You can use the
GOOGLE_NODE_RUN_SCRIPTS
environment variable or gcp-build in your package.json file, these will control what scripts run. You can also specify one or more scripts, or instead pass an empty environment variable to prevent the default behaviour from running,
GOOGLE_NODE_RUN_SCRIPTS=
For more information, you may refer to this document.
I'd also suggest looking into the Cloud Function Release Notes. Hope this helps.