Issues with heroku-run in CircleCI builds

We have been experiencing the following two errors when running CircleCI builds that involve heroku-run, over the past month. We see them almost 50% of the time now, though rerunning the build without cache will many times resolve the issue.

  1. “'run is not a heroku command”
  2. Cannot find module heroku-run

This seems to be a bug in CircleCI, since we are using the method recommended by CircleCI for using these heroku commands. The problem is now effecting our production systems and we would like to find a resolution for it.

Thank you for your time.

Hi @benjamin-rentlytics! Are you using CircleCI 1.0? If so, which image are you currently using (12.04 or 14.04)?

Projects having trouble with Heroku lately are usually using the Ubuntu 12.04 (Precise) build image (this has been 100% of the Heroku CLI issues I’ve seen recently). 12.04 is End of Life, so going forward, we’ll only be modifying the image to add critical bug fixes (not new features or new versions of existing tools).

We’ve got some information to help you migrate to 14.04 (Trusty).

You can change the build image via the menu in Project Settings (gear icon) > Build environment.

Once that’s done, you’ll need to trigger a new build by pushing a commit (just running a rebuild will reuse the same build image, which is what we want to avoid).

This just started happening to us today.