Capistrano Composer fail: Composer could not find a composer.json file

Before you tell me to read through the discussion board, I can tell you that I have, and the threads that covered this deploy message did not resolve the issue, and I think this one has a different reason.

I’m using the WP, Bedrock, Sage, and Capistrano deployment method on a shared hosting (hostgator) with CPANEL, and passwordless ssh seems to be working fine (I can ssh into bitbucket from my local machine AND from the remote server), but I cannot get past the Composer install step.

So far, I’ve been trying to deploy to staging (before attempting production)

The command that chokes is:

SSHKit::Command::Failed: composer exit status: 1
composer stdout: Nothing written
composer stderr: Composer could not find a composer.json file in /home1/ocsta/sites/staging/releases/20180606172101

I do have a composer.json file in the root bedrock folder (same location as Capfile, Gemfile, .env and friends).

When I run in debug, I noticed that there were some additional fails, such as the following:

DEBUG[9ddd922f] Running /usr/bin/env [ -f /home1/ocsta/sites/staging/current/REVISION ] on
DEBUG[9ddd922f] Command: [ -f /home1/ocsta/sites/staging/current/REVISION ]
DEBUG[9ddd922f] Finished in 0.306 seconds with exit status 1 (failed).

However, it doesn’t completely crash until the composer install command, but I do think they might be related.

I think it may have to be with one of the variables or configurations on one of the deploy files.

I am including my deploy files below (NOTE: I’ve been focusing on staging before proceeding on to production):