Failure to start hex

I recently ran into the following error when trying to run any mix command:

## The error

```
Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
** (MatchError) no match of right hand side value:

    {:error,
     {:hex,
      {{:shutdown,
        {:failed_to_start_child, Hex.State,
         {:EXIT,
          {%SyntaxError{
             file: "nofile",
             line: 10,
             column: 41,
             snippet: "                  oauth_exchange => true},",
             description: "unexpected token: }"
           },
           [
             {Code, :validated_eval_string, 3, [file: ~c"lib/code.ex", line: 628]},
             {Hex.Config, :decode_elixir, 1,
              [file: ~c"lib/hex/config.ex", line: 97]},
             {Hex.Config, :read, 0, [file: ~c"lib/hex/config.ex", line: 12]},
             {Hex.State, :start_link, 1, [file: ~c"lib/hex/state.ex", line: 135]},
             {:supervisor, :do_start_child_i, 3,
              [file: ~c"supervisor.erl", line: 996]},
             {:supervisor, :do_start_child, 3,
              [file: ~c"supervisor.erl", line: 982]},
             {:supervisor, :"-start_children/2-fun-0-", 3,
              [file: ~c"supervisor.erl", line: 966]}
           ]}}}}, {Hex.Application, :start, [:normal, []]}}}}

    (hex 2.3.0) lib/hex.ex:5: Hex.start/0
    (mix 1.19.5) lib/mix/hex.ex:64: Mix.Hex.start/0
    (mix 1.19.5) lib/mix/dep/loader.ex:193: Mix.Dep.Loader.with_scm_and_app/5
    (mix 1.19.5) lib/mix/dep/loader.ex:145: Mix.Dep.Loader.to_dep/4
    (elixir 1.19.5) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2
    (mix 1.19.5) lib/mix/dep/loader.ex:368: Mix.Dep.Loader.mix_children/3
    (mix 1.19.5) lib/mix/dep/loader.ex:22: Mix.Dep.Loader.children/1
    (mix 1.19.5) lib/mix/dep/converger.ex:101: Mix.Dep.Converger.all/4
```

Being trying to figure it out including uninstalling and reinstalling elixir and erlang versions using asdf but nothing fixes it.

Any help in resolving this will be appreciated.

Looks like your hex config file has been corrupted. Try running rm ~/.hex/hex.config and running it again.

Thanks