csisnett
How to override a dependency's dependency
Hi everyone!
I’m trying to install the Calecto library but when I run mix deps.get I get the following:
Failed to use “ecto” (version 3.1.7) because
calecto (version 0.17.0) requires ~> 2.1
ecto_sql (version 3.1.6) requires ~> 3.1.0
phoenix_ecto (version 4.0.0) requires ~> 3.0
mix.lock specifies 3.1.7
** (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}
I’ve tried overriding like: {:calecto, “~> 0.17.0”, override: true} but is not working as I keep getting the same error, I’m guessing I have to override calecto’s depedency not the calecto dependency
Marked As Solved
csisnett
Yes, but how can I do that? What would I write instead of {:calendar, "~> 0.17.6"}
or in addition to that ![]()
Edit: Solved it by adding
{:ecto, "~> 3.1.7", override: true}
in the begginning of the dependency list
Also Liked
NobbZ
You need to :override the dependency that can’t be resolved, :ecto in your case.
Sometimes this leads to adding dependencies that usually would just be added transiently.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









