Elixir项目中未找到十六进制依赖项 - poison,absinthe。

3

我在运行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方面是个新手。

2个回答

4
这可能是由于缓存问题导致的。请运行以下命令: mix deps.clean --all 这将清除本地hex存储库的缓存。接着运行以下命令: mix deps.get 以下载最新的依赖项。

谢谢。这解决了问题,但我还是遇到了更多错误。===> 编译 src/ranch_proxy_ssl.erl 失败 src/ranch_proxy_ssl.erl:90: ssl:ssl_accept/3: 已弃用;请改用 ssl:handshake/3** (Mix) 无法编译依赖项:ranch_proxy_protocol,“/Users/a5634160/.mix/rebar3 bare compile --paths "/Users/a5634160/Documents/parc_web/pfom/_build/dev/lib/*/ebin"" 命令失败。您可以使用“mix deps.compile ranch_proxy_protocol”重新编译此依赖项,使用“mix deps.update ranch_proxy_protocol”更新它,或使用“mix deps.clean ranch_proxy_protocol”清除它。 - Vinayak
把下列与编程有关的内容从英语翻译成中文。返回仅翻译的文本:将其作为单独的问题,并提供链接。 - veer7
1
这是问题 https://stackoverflow.com/questions/52475951/elixirhex-getting-hex-error-for-ranch-proxy-protocol-sslssl-accept-3-depreca - Vinayak

1
运行mix deps.get来解决这个问题。

谢谢。但这没有帮助。同样的错误。这是mix deps.get的输出: 解析Hex依赖项... 依赖项解析完成: 未更改: 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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接