soyjeansoy

soyjeansoy

Can't create a Phoenix project

Environment

  • Elixir version using asdf: 1.14.0-otp-25, 1.15.0-otp-25, 1.15.5-otp-25
  • Elixir version using brew: 1.15.5, otp 26
  • Operating system: mac os 13.5.1

mix hex.info:

Hex:    2.0.6
Elixir: 1.15.5
OTP:    26.0.2

Built with: Elixir 1.14.2 and OTP 23.3

Actual behavior

Changing to different Elixir versions didn’t help when installing the framework.

What I did:

  1. asdf install elixir 1.15.5-otp-25
  2. asdf global elixir 1.15.5-otp-25
  3. mix local.hex --force
  4. mix archive.install hex phx_new

then removed everything with asdf and used brew instead.

both approaches returned the same error:

Resolving Hex dependencies...
** (MatchError) no match of right hand side value: :error
    (hex 2.0.6) lib/hex/solver/package_lister.ex:47: anonymous fn/4 in Hex.Solver.PackageLister.dependencies_as_incompatibilities/4
    (elixir 1.15.5) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2
    (hex 2.0.6) lib/hex/solver/package_lister.ex:46: Hex.Solver.PackageLister.dependencies_as_incompatibilities/4
    (hex 2.0.6) lib/hex/solver/solver.ex:123: Hex.Solver.Solver.choose_package_version/1
    (hex 2.0.6) lib/hex/solver/solver.ex:25: Hex.Solver.Solver.solve/2
    (hex 2.0.6) lib/hex/solver.ex:53: Hex.Solver.run/5
    (hex 2.0.6) lib/hex/remote_converger.ex:114: Hex.RemoteConverger.run_solver/5
    (mix 1.15.5) lib/mix/dep/converger.ex:141: Mix.Dep.Converger.all/4

I even uninstalled it (mix archive.uninstall phx.new) then doing all the steps again, but still the same error throws up.

Expected behavior

Following the guide from hexdocs (phx v1.7.7) there shouldn’t be any issues at all when installing Phoenix framework.

Marked As Solved

soyjeansoy

soyjeansoy

I think I fixed the problem. So reading from the error message there’s a portion where it’s pointing with hex deps resolver:

(hex 2.0.6) lib/hex/solver/package_lister.ex:47: anonymous fn/4 in Hex.Solver.PackageLister.dependencies_as_incompatibilities/4

I think my .hex is somehow broken (can’t prove), so what I did:

  1. removed .hex and .mix folder
  2. mix local.hex && mix archive.install hex phx_new
  3. running mix phx.new sample_app went fine.

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New

Other popular topics Top

aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement