Question

Deploying Nx Angular App errors with bash: nx: command not found

Posted April 25, 2021 48 views
AngularDigitalOcean App Platform

Hello,

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

Submit an answer

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