Non-Zero Exit when deploying NestJS in App Containers

I want to deploy my NestJS in DigitalOcean App Containers. I have Database running in DigitalOcean and I want to point my NestJS to that Database. I use this following configuration:

Build script: npm run build <cross-env NODE_ENV=production nest build>
Run script: npm run start:prod <node dist/src/main>

I have specified my DigitalOcean Database in app spec env too. When building the app, it stuck on Downloading and Extracting Node v14.17.6 and stopping after some time stating Build Error: Non-Zero Exit. Can someone provide me guidance? Or something like that? Thank you

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey there!

Are you setting those run and build scripts as the build and run commands in app platform when creating your application? You may need to set those as the build and run commands in the app platform UI when creating the application. That should help run the build correctly.

Build and Run Commands

Hope it helps! Nate