I am trying to login to my Heroku account in my terminal. But, when I type heroku login, a message appears saying press a key to open up my browser but the browser does not open and the login fails then, this message appears.

JSONError: Unexpected end of JSON input while parsing near ' '
at module.exports (/usr/lib/heroku/node_modules/parse-json/index.js:26:19)
at HTTP._parse (/usr/lib/heroku/node_modules/@heroku-cli/plugin-auth/node_modules/http-call/lib/http.js:343:25)

Note that, I am using virtual machine vagrant if it is important !. Also, I am using Ubuntu OS.

enter image description here

Update: I tired to login without using a virtual machine and I successfully logged in So, I suspect Vagrant is the problem !.

1 Answers

1
Md.Shahazad Uddin On

I found the solution to this problem Along with the heroku login use --interactive flag.

heroku login --interactive

here is the link where you can read about it