0
votes

I try to add frontend (angular) in my backend project to deploy it on GCP.
When I try in local with: mvn appengine:run no problem, but when I want to deploy it with mvn package appengine:deploy I get this error:

ERROR: (gcloud.app.deploy) Cannot upload file [/Users/.../project/target/appengine-staging/static/front/node/node], which has size [41783856] (greater than maximum allowed size of [33554432]). Please delete the file or add to the skip_files entry in your application .yaml file and try again.

I didn't have a file: app.yaml. I try to add .gcloudignore file but didn't work.
I don't know what I can do to fix this issue.

1

1 Answers

1
votes

There's a 32MB static file limit with App Engine and this corresponds to the error you're receiving.

Evidently, you're including a file /Users/.../project/target/appengine-staging/static/front/node/node (possibly a NodeJS binary?) in your upload to App Engine and this is being rejected.

You should only include your Java-related sources and the static content (HTML|JavaScript) that forms the Angular app.

If you're unable to streamline the directory that's being deployed, you can use .gcloudignore to exclude content from the upload.