okari8765

okari8765

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.

Marked As Solved

Gazler

Gazler

Phoenix Core Team

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

Last Post!

nico_amsterdam

nico_amsterdam

The error message is not really helpful. In my case rm ~/.hex/hex.config also worked.

The uninstall command also gives an error: mix archive.uninstall hex.ez
Could not find a local artifact named "hex.ez". We found: ...

Where Next?

Popular in Questions Top

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement