Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: SyntaxError for the confing.json: Unexpected end of JSON input #1783

Open
mssngr opened this issue Apr 11, 2021 · 5 comments
Open

BUG: SyntaxError for the confing.json: Unexpected end of JSON input #1783

mssngr opened this issue Apr 11, 2021 · 5 comments

Comments

@mssngr
Copy link

mssngr commented Apr 11, 2021

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Install Heroku CLI on Linux via Snap. Run a Heroku command. See this output:

(node:178006) SyntaxError Plugin: heroku: /home/gbriel/.local/share/heroku/config.json: Unexpected end of JSON input
module: @oclif/config@1.17.0
task: runHook prerun
plugin: heroku
root: /snap/heroku/4048
See more details with DEBUG=*

What is the expected behavior?

The command runs without a syntax error.

#823 had this issue, too, but the issue was closed without any further ado (and apparently without a fix, either.)

@gustavoloureiro
Copy link

Same here.
heroku/7.52.0 linux-x64 node-v12.21.0
Ubuntu 20.04

@res63661
Copy link

same:
(node:30156) SyntaxError Plugin: heroku: C:\Users<username>\AppData\Local\heroku\version: Unexpected end of JSON input
module: @oclif/config@1.13.2
task: runHook init
plugin: heroku
root: C:\Users<username>\AppData\Local\heroku\client\7.56.1
See more details with DEBUG=*
heroku/7.56.1 win32-x64 node-v12.21.0

$ node -v
v14.16.0

@yakob-aleksandrovich
Copy link

You can easily fix this yourself. Create an empty JSON object in the config.json, and heroku will take care of the rest.
file: ~/.local/share/heroku/config.json
{}

@GuruTheCoderYoutube
Copy link

GuruTheCoderYoutube commented Dec 4, 2021

@yakob-aleksandrovich's solution fixed the issue
Run the following commands :-

  1. cd ~

  2. cd .local

  3. cd share

  4. nano config.json
    Edit :-
    a) You have to press "Ctrl + O" and press enter to save the file
    b) Press "Ctrl + X" to exit

  5. Type in "{ }"
    Just the stuff INSIDE the quotes.

  6. heroku buildpacks

  7. heroku update

@GuruTheCoderYoutube
Copy link

Btw my solution is just for linux/macos users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants