Heroku CLI installation error: "PATH not updated, original length 1585 > 1024"
Asked Answered
B

7

28

I use Windows 10. When I run Heroku Cli (64) installation I get an error "PATH not updated, original length 1585 > 1024". How to solve this problem?

Bathyal answered 1/6, 2017 at 7:46 Comment(0)
D
53

I got it to work on Windows 10.

I tried two things and I'm unsure which one got Heroku to work. The first thing you can try is adding it to PATH in CMD or Git Bash in this post.

You should also try to manually add it to PATH by going to Settings->Advanced System Settings->Environment Variables and adding a system variable with name PATH and with value "C:\Program Files\Heroku\bin" or wherever you have your heroku.exe file.

This will manually update the PATH.

Dreamadreamer answered 13/6, 2017 at 0:30 Comment(1)
Thanks - my installer was frozen on the last step "add path blah blah" - I just went in there, clicked on the Path variable (bottom window - System variables), and when I hit "Edit" it brought up another list with all the environmental variables. I just added C:\Program Files\Heroku\Bin like you said and the installer completed. Thanks :)Tonitonia
G
3

The Installer is trying to apply an environment variable to the Path. But there are already too many variables setup. Delete the ones that you no longer require and it should work. You could access the System Environment variables by visiting- Settings->Advanced System Settings->Environment Variables

Grumble answered 19/2, 2019 at 18:19 Comment(0)
G
0

I may be too late to answer this question but I'll share what worked for me, in case some one else ran into the same issue. Basically, with time my path variable had too many variables added to it, and apparently, there is a characters limit that can be added to the PATH variable. I deleted a few variables in the PATH that I do not need anymore, and that was all!

Galvez answered 17/11, 2018 at 20:54 Comment(0)
S
0

I just came across with the same problem. The solution I used is similar to selflearningcode but instead of setting a system variable which failed, I set a user variable.

Try this after selflearningcode's answer, if you can echo %PATH% and it displays heroku you should be good to go. Else, set a user variable on the same screen by adding a new entry to the path and it should work.

Note: Start a new terminal for the effects to be visible.

Strengthen answered 19/3, 2020 at 14:25 Comment(0)
C
0

I faced this issue and sad to tell none of this methods works for me,

First I tried to put env PATH as told and again type heroku --version in cmd but it shows that not installed yet.

after that I Followed this method and it works, first identify your location that heroku installed, in my case program files>heroku> like that then copy that path like this, C:\Program Files\Heroku\bin

ok, then open CMD in administrator mode, (start > type cmd> right click on cmd and click run as administrator)

then type-echo %PATH% In my case output was like this,

enter image description here

Ok now type this, set PATH="C:\Program Files\Heroku\bin;%PATH%" and press Enter. output is like this,

enter image description here

also after that you can type heroku --version and then check whether it installed or not.

Cattima answered 18/6 at 7:14 Comment(0)
L
-1

You might have to set Environment variables in Advanced System Settings. If there is already a path defined, just append your path with ;

ex: Existing path(It can be anything, just as an example): C:\Program Files (x86)\Google\Chrome\Application

If you want to add heroku path: C:\Program Files (x86)\Google\Chrome\Application;C:\Program Files\Heroku\bin

Hope it works.

Lye answered 9/12, 2017 at 7:34 Comment(0)
S
-2

All answers above work. Just to add make sure you DO NOT use the same terminal. close it and re-open. Editor close it and re-open --- in case you are using the terminal in your IDE

Schaal answered 3/3 at 0:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.