未找到长生不老药项目的十六进制依赖项 - 毒药,苦艾酒

hex dependencies not found for elixir project - poison, absinthe

ecto.createecto.migrate 出现 unchecked dependency for environment 错误。我有以下 mix.exs 个文件依赖项

  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

当我 运行 命令 mix ecto.create && mix ecto.migrate 我得到以下错误。

  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

我是 hex、elixir 和 mix 方面的新手。

运行 mix deps.get 解决问题。

这可能是由于 cache issue

运行 命令下方

mix deps.clean --all

这会清除十六进制存储库的本地缓存

然后

mix deps.get

下载最新的依赖项