3

I am getting unchecked dependency for environment error for ecto.create and ecto.migrate. I have below mix.exs file dependency entry

  defp deps do
    [{:phoenix, "~> 1.3"},
     {:phoenix_pubsub, "~> 1.0"},
     {:phoenix_ecto, "~> 3.3"},
     {:postgrex, ">= 0.0.0"},
     {:phoenix_html, "~> 2.11"},
     {:phoenix_live_reload, "~> 1.1", only: :dev},
     {:gettext, "~> 0.11"},
     {:cowboy, "~> 1.0"},
     {:absinthe, "~> 1.4"},
     {:absinthe_plug, "~> 1.4"},
     {:absinthe_ecto, "~> 0.1.3"},
     {:proper_case, "~> 1.0.0"},
     {:rbmq, "~> 0.4"},
     {:lager_logger, "~> 1.0"},
     {:quantum, "~> 2.2"},
     {:timex, "~> 3.0"},
     #{:amqp_client, "~> 3.6.7-pre.1", override: true},
     #{:rabbit_common, "~> 3.6.7-pre.1", override: true},
     {:httpoison, "~> 0.11.0"},
     {:confex, "~> 1.4"},
     {:cors_plug, "~> 1.5"},
     {:logger_file_backend, "~> 0.0.9"},
     {:distillery, "~> 1.1"},
     {:keycloak, "~> 0.2.0"},
     {:plug, "~> 1.4", override: true},
     {:poison, "~> 3.1", override: true}]
  end

when I run the command mix ecto.create && mix ecto.migrate I get below error.

  Unchecked dependencies for environment dev:
* absinthe (Hex package)
  the dependency does not match the requirement "~> 1.4", got "1.2.5"
* poison (Hex package)
  the dependency does not match the requirement "~> 3.1", got "2.2.0"
** (Mix) Can't continue due to errors on dependencies

I am a greenhorn in hex,elixir and mix.

Vinayak
  • 55
  • 4

2 Answers2

4

This could be due to cache issue

Run below command

mix deps.clean --all

This cleans the local cache of hex repository

and then

mix deps.get

which downloads the latest dependencies

veer7
  • 20,074
  • 9
  • 46
  • 74
  • Thank you. This has solved the issue but I am getting more error `===> Compiling src/ranch_proxy_ssl.erl failed src/ranch_proxy_ssl.erl:90: ssl:ssl_accept/3: deprecated; use ssl:handshake/3 instead ** (Mix) Could not compile dependency :ranch_proxy_protocol, "/Users/a5634160/.mix/rebar3 bare compile --paths "/Users/a5634160/Documents/parc_web/pfom/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile ranch_proxy_protocol", update it with "mix deps.update ranch_proxy_protocol" or clean it with "mix deps.clean ranch_proxy_protocol"` – Vinayak Sep 24 '18 at 07:16
  • put this as a separate question and provide link here. – veer7 Sep 24 '18 at 07:17
  • 1
    Here is the question https://stackoverflow.com/questions/52475951/elixirhex-getting-hex-error-for-ranch-proxy-protocol-sslssl-accept-3-depreca – Vinayak Sep 24 '18 at 09:11
2

Run mix deps.get to solve the issue.

denis.peplin
  • 9,585
  • 3
  • 48
  • 55
  • Thank you. But this didn't help. Same error. Here is the output of `mix deps.get` `Resolving Hex dependencies... Dependency resolution completed: Unchanged: absinthe 1.4.12 absinthe_ecto 0.1.3 absinthe_plug 1.4.4 amqp 1.0.3 amqp_client 3.7.5 base64url 0.0.1 certifi 1.2.1 combine 0.10.0 ` – Vinayak Sep 24 '18 at 06:54