Lee McAlilly
Lee McAlilly

Reputation: 9316

Heroku Command Line Interface (CLI) Unexpected token � in JSON at position 0 error

I've been searching around the heroku docs, heroku community, stack overflow, google and can't figure out an issue I'm having with the heroku command line interface. Any time I try to run the heroku command I get the same error:

Error parsing /Users/lee/.local/share/heroku/client/6.15.26-5726b6f/node_modules/@cli-engine/engine/package.json: Unexpected token � in JSON at position 0

Here's the full error: https://gist.github.com/leemcalilly/21f28769c0d1a96127be1fdb2b63f236

The only things that have changed recently on my system is that I changed my heroku password and also installed docker. Otherwise nothing has changed and I'm still able to deploy changes via git.

I installed heroku's command line tools on my Mac with Homebrew and have already tried uninstalling and reinstalling. Still getting the same error.

Any help pointing me in the right direction on this would be helpful.

EDIT:

Here's how the file that it's getting stuck on looks (package.json):

https://gist.github.com/leemcalilly/35fb919b490bf02c6779811448da5f02

Very crazy. Not even sure how that happened, but I would have thought that uninstalling through homebrew and reinstalling would work.

Upvotes: 2

Views: 389

Answers (1)

Lee McAlilly
Lee McAlilly

Reputation: 9316

Got an answer on this from Heroku support that fixed this issue for anyone else that runs into this:

Hey Lee, looks like you may have had a bad download/install but rather than re-install with brew I'd like you try something else. Let's remove your heroku client directory and then run heroku update with will fetch a new one. Try rm -fr /Users/lee/.local/share/heroku, then heroku update and it should fetch an updated CLI. Note: any plugins you have installed will have to be re-installed after this.

Let me know how it goes!

Upvotes: 1

Related Questions