Sinc
Hex.Application error trying to run mix deps.get
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
I tried to run the first LLM example “Your first LLM agent” in LiveBook. Firstly I got a weird Setup block:
Mix.install([
{{mix_dep:ji...
New
Well, after getting tired of using prints to debug, I’ve decided to setup the debugger. After setting the launch as this:
{
"configu...
New
I am trying to build a container for a new Phoenix app that I want to deploy in our kubernetes cluster. The container blows up when it ...
New
or put another way, can I run a chunked worker on a queue which has no global limit set?
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #performance
- #security










First 4 of 4 Posts
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