Matt
Matt

Reputation: 103

Heroku CLI suddenly broken

Suddenly, from one command to the next, the Heroic CLI stopped working. No matter what I type into the command line, I get the same error. See below.

$heroku help
 ▸    commands is not a heroku command.
 ▸    Perhaps you meant domains
 ▸    Run heroku help for a list of available commands.
 !    error getting commands pid 24643 exit 127

What the heck is going on?

Upvotes: 4

Views: 1423

Answers (3)

morgler
morgler

Reputation: 1809

Something similar (although with a different error message) happened to me after updating my OS. On a Mac, make sure to install the CommandLineTools (with Xcode) after a major OS update!

Upvotes: 0

afxjzs
afxjzs

Reputation: 982

This just happened to me. I fixed it by removing the heroku app the same way i installed it. I had the gem installed, so i uninstalled that.

gem uninstall heroku

Then i used homebrew to reinstall it.

brew install heroku

and it worked.

Upvotes: 0

Mohamed Okasha
Mohamed Okasha

Reputation: 129

this problem just happened with me after the last update of heroku CLI, heroku CLI check if there is updates after execute any command related with and when run updates the problem occurs because is not working with root permissions.

to fix this you need to reinstall heroku CLI

sudo apt-get remove heroku
sudo add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
curl -fL https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install heroku

and you probably need to add this path

PATH=$PATH:~/usr/bin
export PATH

Upvotes: 3

Related Questions