I've added a trigger to my Cloud Build that is failing when deploying my Angular 18 application to an App Service on the App Engine. I can manually release my application by copying it up to a cloud bucket and then running gcloud app deploy. However, my build trigger (which worked fine for my older version of angular) is failing with this error:
Step #3: Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/previous-releases/.
Step #3: An unhandled exception occurred: (0 , node_os_1.availableParallelism) is not a function
Step #3: See "/tmp/ng-mBCKOy/angular-errors.log" for further details.
I have found a lot of resources about the node.js version but I don't believe that's my problem. In my app.yaml, I'm specifying node20.
service: my-application
runtime: nodejs20
env_variables:
environment: "--prod"
handlers:
- url: /
secure: always
static_files: dist/my-application/index.html
upload: dist/my-application/index.html
# Routing rules for resources, css, js, images etc. Any file with format filename.ext
- url: /(.*\.(.+))$
secure: always
static_files: dist/my-application/\1
upload: dist/my-application/(.*\.(.+))$
# Routing rule for Angular Routing
- url: /(.*)
secure: always
static_files: dist/my-application/index.html
upload: dist/my-application/index.html
I also searched for the availableParallelism error and found this article: Angular 18 error after update:An unhandled exception occurred: (0 , os_1.availableParallelism) is not a function
I updated my angular 18 to 18.2.4 - same issue.
when I manually push my app up to the app engine, I'm using the same app.yaml as the trigger uses. Kind of at a loss of where to look next.
TIA
cloudbuild.yaml