Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku command error .local/share/heroku/client/bin/heroku: line 21:

Tags:

My heroku toolbelt had been working fine until last week that it's giving me this error on all heroku commands.

$ heroku run console -a abc /Users/songserm/.local/share/heroku/client/bin/heroku: line 21: /Users/songserm/.local/share/heroku/client/bin/node: No such file or directory /Users/songserm/.local/share/heroku/client/bin/heroku: line 21: /Users/songserm/.local/share/heroku/client/bin/node: No such file or directory 

I didn't know that my heroku has been auto upgraded, but what has changed is I installed heroku-vi addon around the time. Not sure if it's the case.

Has anyone seen this issue before?

Noted that I installed heroku on my Mac using homebrew.

like image 221
Chawarong Songserm PMP Avatar asked Jun 10 '17 16:06

Chawarong Songserm PMP


People also ask

How to login to heroku from command line?

Get Started with the Heroku CLIAfter you install the CLI, run the heroku login command. Enter any key to go to your web browser to complete login. The CLI then logs you in automatically. If you'd prefer to stay in the CLI to enter your credentials, run heroku login -i .

How do I install heroku on Vscode?

Open the current Heroku app Activity Dashboard when clicking on the Heroku Status. Add a command in the Command Palette to open the Heroku-hosted app. Create and deploy a new Heroku app via the Command Palette. Handle pipelines.

How do I download heroku command line on Mac?

To install the Heroku CLI on macOS, first ensure that you have Homebrew installed on your machine. After you confirm that the Heroku CLI was installed correctly, type heroku login into the command line. You'll be prompted to enter any key to go to the web browser to complete login.


2 Answers

Cause:

This also happened to me, the client auto-updated but didn't do so properly:

heroku run console heroku-cli: Updating to 6.11.14-c5f9179... 12.9 MB/12.9 MB /Users/steves/.local/share/heroku/client/bin/heroku: line 21: /Users/steves/.local/share/heroku/client/bin/node: No such file or directory /Users/steves/.local/share/heroku/client/bin/heroku: line 21: /Users/steves/.local/share/heroku/client/bin/node: No such file or directory 

Solution:

The resolution was to re-install the client using the following (as found here https://github.com/heroku/cli/issues/485):

rm -rf ~/.local/share/heroku/client 

I then checked using the status command and it re-installed correctly:

heroku status heroku-cli: Updating to 6.11.14-c5f9179... 12.9 MB/12.9 MB Migrating Heroku CLI v5 plugins... done Apps:      No known issues at this time. Data:      No known issues at this time. Tools:     No known issues at this time. 
like image 72
Steve Smith Avatar answered Mar 01 '23 23:03

Steve Smith


Heroku-error-Not a directory

Not a directory Error when executing Heroku commands

heroku ▸   stat /User/xxx/.local/share/heroku/client/bin/heroku: not a directory ▸   fork/exec /User/xxx/.local/share/heroku/client/bin/heroku: not a directory 

Solution is to remove previous directory

rm -rf ~/.local/share/heroku/client 
like image 35
Jesse shirly Avatar answered Mar 02 '23 01:03

Jesse shirly