I’m currently exploring deploying an Nx based angular app on Digital Oceans App Platform but am getting an error on deployment:
bash: nx: command not found
[2021-04-25T09:32:14.612631910Z] bash: nx: command not found [2021-04-25T09:32:14.616565055Z] building: exit status 127 [2021-04-25T09:32:14.620799953Z] ERROR: failed to build: exit status 1 [2021-04-25T09:32:21.282199271Z] cut: write error: Broken pipe [2021-04-25T09:32:29.193501853Z] [2021-04-25T09:32:29.193542588Z] For documentation on the buildpacks used to build your app, please see: [2021-04-25T09:32:29.193563839Z] Node.js: https://do.co/apps-buildpack-node [2021-04-25T09:32:29.195310459Z] [2021-04-25T09:32:29.195927891Z] ! Build failed (145)
Originally I was using the following build command:
nx build [nx angular app name] --prod
And then I tried using:
npm i --only=dev && nx build [nx angular app name] --prod
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.