heroku : #echo: command not found - heroku

I'm trying to install the heroku cli locally on win 7 -64 bit. I downloaded and ran the installer at https://devcenter.heroku.com/articles/heroku-cli#windows. I can see that the path E:/Heroku1/bin/ has been added to PATH. Using git-bash I try:
$ heroku -v
/e/Heroku1/bin/../client/bin/heroku.cmd: line 1: #echo: command not found
/e/Heroku1/bin/../client/bin/heroku.cmd: line 3: fg: no job control
How can I get this working?

I think the problem is that I may have been using an outdated git-bash. At this point in time they recommend using Git 2.8. I added the following to my path and it started working:
C:\Git28\bin;C:\Heroku\bin

Related

Bash github project fails to run when cloned on WSL Ubuntu

I have a simple bash script written on a WSL Ubuntu system; it runs perfectly there. I then git push it up to github, and go to a different systems WSL Ubuntu and git clone the project, cd into that folder and run the script, but it is broken with the below errors.
I tried dos2unix on it, but this does not work, same errors and same broken state. Do you have some suggestions about what might be causing this (something is changed by storing it in github I guess), and how to fix (as before, none of the below errors are seen on the originating WSL Ubuntu system, where the script runs perfectly)?
: command not found
: command not found
: command not found
: invalid shell option name
: command not found
: command not found
-bash: .custom: line 147: syntax error near unexpected token `$'{\r''
'bash: .custom: line 147: `fnheader() {
I had the same problem with Windows line endings, so my solution was:
# Remove cloned repo
git config --global core.autocrlf input
# Clone again the repo
Let me know if it works for you too.
Regards.

Git bash can not run any ng command (Angular CLI)

I'm working on git bash cmd. When I try run ng command e.g. ng serve or ng gc new-component I see this output:
C:\Users\user\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
In the middle of output I see problem with left and right slash. How can I fix it?
I suppose, it isn't problem with environment paths, because all ng commands are working in Windows cmd or PowerShell.
Please see comments from #steveswork at:
https://github.com/nodejs/node/issues/29287
You have to delete C:/Users/user/AppData/Roaming/npm and C:/Users/user/AppData/Roaming/npm-cache and
reinstall global npm modules.
(This typically happens after an upgrade or downgrade of node)
Good Luck.

Failed to launch git bash

The terminal process command 'C:\Program Files\Git\bin\bash.exe' failed to launch (exit code: 2)
I have already setup git. Git directory:
I had this issue with the 'start git-bash' extention in vscode. You just need to add the folder "C:\Program Files\Git\" to your path and restart vs code.
I reinstalled Git and all work well
Working Git Bash
If you have this issue, with the following error code:
'ExecutionPolicy', 'Bypass'" terminated with exit code: 2.'
What worked for me is I went into the settings.json file and removed the following line:
"terminal.integrated.shellArgs.windows": ["-ExecutionPolicy","Bypass"]
If Git Bash doesn't work you can try installing a Windows WSL2 such as Ubuntu 18.04 and use that instead of Git Bash.
Here is how you select a Windows WSL:
Check out this link if you need help installing WSL2 on Windows.
You can see a similar issue (with cmd, not bash) in Microsoft/vscode issue 62953.
Try with a portable version of Git bash (like PortableGit-2.20.0.rc1.windows.1-64-bit.7z.exe), uncompress in a custom folder (like C:\Git, instead of C:\Program Files\Git)
Sometimes antivirus software might cause that behaviour, since launchin a terminal involes a process creating another process.
So add an exception in your Antivirus for Visual Studio Code or stop all the antivirus related services --at your own risk--
First, check that you have Git Bash downloaded on your PC. If you already have it installed, then check you can access python program.
If not installed, please install directly from the following link: https://git-scm.com/download/win

MJML run and watch error

I'm following the tutorial on https://mjml.io/documentation/#basic-layout-example
And followed these instructions to install https://mjml.io/download
But whenever I want to use ./node_modules/.bin/mjml index.mjml or mjml index.mjml I get the following error:
Command 'sed' is available in '/bin/sed'
The command could not be located because '/bin' is not included in the
PATH environment variable.
sed: command not found
/usr/bin/env: 'node': No such file or directory
I have no idea what I'm doing wrong and Google hasn't been helpful so far.
Any idea why this is happening? Thanks for your time :(
Seems you have messed your PATH environment variable. The sed program is there as is part of the core packages. You can try to do something like the mentioned here.
Also try to reach the mjml support group in slack
I think you have not installed node properly. Try reinstalling it.
If you reinstalled the node and then also you are facing the problem then there is some problem with Windows because a few days ago I was facing a problem when I was running the npm run build command then I switch to my Virtual box Linux OS there it works fabulously.

sh.exe": /bin/git bad file number when git -version

Just installed git and when I run the git bash and enter git -version I get this error: sh.exe": /bin/git: bad file number.
During the installation I had one error but the installation proceeded :"unable to configure the line ending conversion core.autocrif true." Git GUI isn't launching and I get the error : "Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item." Trying to run as admin doesn't change it.
I run into this problem occasionally (including about 5 minutes ago) and I "solve" it by re-installing the Git client.

Resources