Cannot run `npx cap sync` in Apple Automator

I am in the process of putting all my commonly used terminal commands into Automator applications.

Then, I’d have an application that when opens, e.g., runs npx cap sync in my app directory.

Unfortunately, it doesn’t work:

export PATH=$PATH:/usr/local/bin/ // This is necessary so the script finds `npx`

cd /Users/MY_NAME/Documents/APP_DIRECTORY

npx cap sync

This returns the following empty error:

Btw, if I just do npx cap, the workflow completes successfully.