【问题标题】:hex dependencies not found for elixir project - poison, absinthe未找到 elixir 项目的十六进制依赖项 - 毒药、苦艾酒
【发布时间】:2019-02-27 15:31:27
【问题描述】:

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

我是十六进制、长生不老药和混合的新手。

【问题讨论】:

    标签: elixir elixir-mix elixir-poison absinthe hex-pm


    【解决方案1】:

    这可能是由于cache issue

    运行下面的命令

    mix deps.clean --all

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

    然后

    mix deps.get

    下载最新的依赖项

    【讨论】:

    • 谢谢。这已经解决了这个问题,但我收到更多错误===> 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"
    • 将此作为单独的问题并在此处提供链接。
    【解决方案2】:

    运行mix deps.get 解决问题。

    【讨论】:

    • 谢谢。但这没有帮助。同样的错误。这是mix deps.getResolving 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 的输出
    猜你喜欢
    • 2021-07-08
    • 2018-12-25
    • 2018-06-09
    • 2020-05-04
    • 2021-10-14
    • 2016-02-10
    • 2018-03-19
    • 1970-01-01
    • 2023-03-26
    相关资源
    最近更新 更多