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.
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 .
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.
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.
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
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With