Sinc
I tried to run mix deps.get and get this error:
11:33:16.611 \[error\] Task #PID<0.335.0> started from :hex_fetcher terminating
\*\* (SyntaxError) nofile:12:41: unexpected token: }
|
12 | oauth_exchange => true},
| ^
(elixir 1.14.5) lib/code.ex:424: Code.validated_eval_string/3
(hex 2.5.0) lib/hex/config.ex:138: Hex.Config.decode_elixir/1
(hex 2.5.0) lib/hex/config.ex:12: Hex.Config.read/0
(hex 2.5.0) lib/hex/config.ex:64: Hex.Config.update/1
(hex 2.5.0) lib/hex/config.ex:161: Hex.Config.update_repos/1
(hex 2.5.0) lib/hex/auth.ex:110: Hex.Auth.persist_oauth_tokens/4
(hex 2.5.0) src/mix_hex_cli_auth.erl:567: :mix_hex_cli_auth.exchange_for_oauth_token/4
Function: #Function<32.44801239/0 in Hex.Registry.Server.prefetch_online/2>
Args: [ ]
Since I only upgraded to local.hex 2.5.0 last week I tried downgrading. SImilar problem. Found that there is a 2.5.1 which sounds like an emergency upissue so tried that. Same prblem. ANy idea what’s going on? I don’t expect this is me, but tell me if there is a workaround?
p.s. I don’t seem to be able to insert a code block with triple ticks. As soon as I type the third one this window hangs. Tried it about three times in different ways before abandoning hope.
mix deps.get
12:45:09.090 \[notice\] Application hex exited: Hex.Application.start(:normal, [ ]) returned an error: shutdown: failed to start child: Hex.State
\*\* (EXIT) an exception was raised:
\*\* (SyntaxError) nofile:12:41: unexpected token: }
|
12 | oauth_exchange => true},
| ^
(elixir 1.14.5) lib/code.ex:424: Code.validated_eval_string/3
(hex 2.5.1) lib/hex/config.ex:138: Hex.Config.decode_elixir/1
(hex 2.5.1) lib/hex/config.ex:12: Hex.Config.read/0
(hex 2.5.1) lib/hex/state.ex:170: Hex.State.start_link/1
(stdlib 5.2.3) supervisor.erl:420: :supervisor.do_start_child_i/3
(stdlib 5.2.3) supervisor.erl:406: :supervisor.do_start_child/2
(stdlib 5.2.3) supervisor.erl:390: anonymous fn/3 in :supervisor.start_children/2
12:45:09.108 \[notice\] Application inets exited: :stopped
12:45:09.110 \[notice\] Application ssl exited: :stopped
12:45:09.110 \[notice\] Application public_key exited: :stopped
12:45:09.110 \[notice\] Application asn1 exited: :stopped
12:45:09.110 \[notice\] Application crypto exited: :stopped
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: 12, column: 41, snippet: %{offset: 40, content: " oauth_exchange => true},"}, description: "unexpected token: }"}, \[{Code, :validated_eval_string, 3, \[file: 'lib/code.ex', line: 424\]}, {Hex.Config, :decode_elixir, 1, \[file: 'lib/hex/config.ex', line: 138\]}, {Hex.Config, :read, 0, \[file: 'lib/hex/config.ex', line: 12\]}, {Hex.State, :start_link, 1, \[file: 'lib/hex/state.ex', line: 170\]}, {:supervisor, :do_start_child_i, 3, \[file: 'supervisor.erl', line: 420\]}, {:supervisor, :do_start_child, 2, \[file: 'supervisor.erl', line: 406\]}, {:supervisor, :"-start_children/2-fun-0-", 3, \[file: 'supervisor.erl', line: 390\]}\]}}}}, {Hex.Application, :start, \[:normal, [ ]\]}}}}
(hex 2.5.1) lib/hex.ex:5: Hex.start/0
(mix 1.14.5) lib/mix/hex.ex:59: Mix.Hex.start/0
(mix 1.14.5) lib/mix/dep/loader.ex:188: Mix.Dep.Loader.with_scm_and_app/4
(mix 1.14.5) lib/mix/dep/loader.ex:141: Mix.Dep.Loader.to_dep/3
(elixir 1.14.5) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(elixir 1.14.5) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(mix 1.14.5) lib/mix/dep/loader.ex:358: Mix.Dep.Loader.mix_children/2
(mix 1.14.5) lib/mix/dep/loader.ex:18: Mix.Dep.Loader.children/0
Trending in Troubleshooting
Job args skip format_job_args/1 in the job edit form and in search hints, even with read-only access
Hi Parker and Shannon,
First, thank you for Oban and Oban Web. They’re a pleasure to build on, and the resolver’s format_job_args/1 and ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Questions & Help>Troubleshooting
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #ai
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
netoum
Have you tried deleting
~/.hex/hex.config?I would also uninstall the hex archive and reinstall it after deleting the config.
Please note that you will loose any previously connected hex account and will need to authenticate to hex again
Sinc
Lovely. I wasn’t aware of a .hex directory. Deleting the hex.config worked. Interestingly when I ran a deps.get again the hex.config was not recreated, it just seems to have lived without it.
The original file clearly had a syntax error in it, with mismatched braces, so something was poorly installed somewhere along the way.
Sinc
Can’t I mark this solution as the correct response?
AstonJ
Fixed - this is a new category and it hadn’t been turned on yet. Sorted now