首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何处理‘`phoenix`’依赖版本错误问题?

如何处理‘`phoenix`’依赖版本错误问题?
EN

Stack Overflow用户
提问于 2022-11-05 22:50:24
回答 1查看 27关注 0票数 0

我想使用分页使用偏移-限制方法,并选择scrivener包.

我的私人项目的mix.exs文件如下:

代码语言:javascript
复制
  defp deps do
    [
      {:phoenix, "~> 1.6.10"},
      {:phoenix_ecto, "~> 4.4"},
      {:ecto_sql, "~> 3.6"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 3.0"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:phoenix_live_view, "~> 0.17.5"},
      # {:floki, ">= 0.30.0", only: :test},
      {:phoenix_live_dashboard, "~> 0.6"},
      {:esbuild, "~> 0.4", runtime: Mix.env() == :dev},
      {:swoosh, "~> 1.3"},
      {:telemetry_metrics, "~> 0.6"},
      {:telemetry_poller, "~> 1.0"},
      {:gettext, "~> 0.18"},
      {:jason, "~> 1.2"},
      {:plug_cowboy, "~> 2.5"},
      {:nimble_csv, "~> 1.2"},
      {:iconv, "~> 1.0"},
      {:floki, "~> 0.33.0"},
      # {:html5ever, "~> 0.13.0"},
      {:fast_html, "~> 2.0"},
      {:mochiweb, "~> 3.1"},
      {:scrivener_ecto, "~> 2.0"},
      {:scrivener_html, "~> 1.8"}  #<--------- problem here
      #{:csv, "~> 2.5"}
    ]
  end

运行mix deps.get时,错误消息如下所示:

代码语言:javascript
复制
Failed to use "phoenix" (version 1.6.14) because
  phoenix_live_reload (version 1.3.3) requires ~> 1.4
  phoenix_live_view (version 0.17.12) requires ~> 1.6.0 or ~> 1.7.0
  scrivener_html (versions 1.8.0 and 1.8.1) requires ~> 1.0 and < 1.5.0
  mix.lock specifies 1.6.14

** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, "~> 1.0", override: true}

但是在scrivener的mix.exs文件中,dep信息如下,凤凰的dep< 1.7。

代码语言:javascript
复制
 defp deps do
    [
      {:scrivener, "~> 1.2 or ~> 2.0"},
      {:phoenix_html, "~> 2.2 or ~> 3.0"},
      {:phoenix, "~> 1.0 and < 1.7.0", optional: true},
      {:plug, "~> 1.1"},
      {:ex_doc, "~> 0.19", only: :dev},
      {:earmark, "~> 1.1", only: :dev}
    ]
  end

为什么出现错误消息scrivener_html (versions 1.8.0 and 1.8.1) requires ~> 1.0 and < 1.5.0

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-11-06 00:50:52

您所看到的文件位于scrivener_html的主分支上,而您正在添加版本1.8.1,该版本甚至不支持菲尼克斯1.5。

当它们发布一个新版本时,您可以使用{:scrivener_html, github: "mgwidmann/scrivener_html"}直接指向主分支。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74332019

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档