'heroku' is not recognized as an internal or external command

225 Views Asked by At

Actually I am trying to host my site live on Heroku and I downloaded Heroku cli also but when i am trying to run any Heroku command it didn't work. I have set environment variable also. help me to find the solution. I used Techstack as: python, Django, sqlite3 and Heroku for hosting. I am following this video and I am sharing link with you: https://www.youtube.com/watch?v=kBwhtEIXGII&list=PL-51WBLyFTg2vW-_6XBoUpE7vpmoR3ztO&index=23

1

There are 1 best solutions below

1
AsmitTheCoder On

You're probably using an old version or the deprecated package 'heroku-cli'. The new one is just called 'heroku' Uninstall that by

npm uninstall -g heroku-cli

Then install the new package

npm i -g heroku

And now all your works will go perfectly.Just try heroku login and any other heroku command. If still not works: 1.Set the Path in environment variables.

2.I created a separate path: Variable name : Heroku, Variable Path as C:\Program Files\Heroku\bin. But it didn't work

3.so i added the same path in Path variable which is already created and it worked.

4.My Heroku.exe PATH is in C:\Program Files\Heroku\bin . Make sure your Heroku's Path is correct.

Source:Heroku not recognized as an internal or external command (Windows)