Hey there! Trying to deploy a nodejs server using the Digital Ocean App Platform. This server sits in a yarn workspaces monorepo.
My app spec looks like this here:
alerts: - rule: DEPLOYMENT_FAILED - rule: DOMAIN_FAILED envs: // ... name: foo region: fra services: - build_command: yarn workspace server build environment_slug: node-js github: branch: test deploy_on_push: true repo: foo/bar http_port: 8080 instance_count: 1 instance_size_slug: basic-xxs log_destinations: - logtail: token: **** name: Logtail name: foo routes: - path: / run_command: yarn workspace server start source_dir: /
build seems to be working just fine according to the logs. But after the build it’s getting stuck on
Adding layer 'heroku/nodejs-engine:yarn' (at least this is the last log entry).
[2022-02-16 13:16:56] Running custom build command: yarn workspace server build [2022-02-16 13:16:57] yarn workspace v1.22.17 [2022-02-16 13:16:57] yarn run v1.22.17 [2022-02-16 13:16:58] $ tsc [2022-02-16 13:17:02] Done in 4.62s. [2022-02-16 13:17:02] Done in 5.38s. [2022-02-16 13:17:53] [2022-02-16 13:17:53] => Uploading the built Docker image to the container registry... [2022-02-16 13:18:05] Adding layer 'heroku/nodejs-engine:nodejs' [2022-02-16 13:18:07] Adding layer 'heroku/nodejs-engine:yarn' 
after that Digital Oceans GUI says
Build Error: Out of Memory. So I went ahead and increased memory from 512MB to 4GB, no changes.
Any ideas? I get the feeling it could be related to the yarn workspaces here.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.