Heroku登录-JSONError:在“”附近进行解析时,JSON输入意外结束

时间:2019-04-26 20:53:23

标签: heroku terminal vagrant

我正在尝试在终端上登录我的Heroku帐户。但是,当我键入heroku login时,会出现一条消息,提示按一个键打开我的浏览器,但浏览器无法打开,并且登录失败,然后出现此消息。

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)

请注意,如果重要,我正在使用虚拟机无所事事!另外,我正在使用Ubuntu OS。

enter image description here

更新:我不使用虚拟机就无法登录,并且我成功登录了。所以,我怀疑Vagrant是问题所在!。

1 个答案:

答案 0 :(得分:1)

我找到了解决此问题的方法 连同heroku登录一起使用--interactive标志。

heroku login --interactive

here is the link where you can read about it