As I don't have admin rights on my laptop, so downloaded the zip version of heroku CLI for deploying my app. When I execute the cmd from the bin path of the heroku it's launching and working fine, but when trying to launch from cygwin it's not working. Followed below workaround as I thought path issues, symlinks issues
.bash_profile
#Setting the heroku path on the cygwin
export PATH=$PATH:"/cygdrive/c/Django/heroku/bin/heroku"
export CYGWIN="winsymlinks:native"
cd C:/cygdrive && rm -rf c && ln -s -v C:/ c
.bashrc
alias heroku="/cygdrive/c/Django/heroku/bin/heroku"
which are suggested in the SO, but not helpful and I'm getting below error when trying to execute $ heroku in cygwin..
$ heroku
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module 'C:\cygdrive\c\Django\heroku\bin\run'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980
:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_ma
in.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Note: I'm able to launch heroku from GIT bash and CMD
whole time I was adding wrong files to the path and also executing them, Extracted zip folder of heroku contains following files
So, what I did..? copied the full path of bin including heroku.cmd file and pasted in the below file ".bashrc" as alias.
.bashrc
alias heroku="/cygdrive/c/Django/heroku/bin/heroku.cmd"
as heroku.cmd file is a script file and it contains set of commands for the heroku.
and I'm able to login to heroku and create app as well.