0

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

2
  • Please include the cloudbuild.yaml Commented Sep 14, 2024 at 1:17
  • can you try deploying locally and check if it is working? Commented Sep 16, 2024 at 15:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.