rsshek

rsshek

Unable to compile the elixir project

Getting this error when running mix deps.compile.
I tried rm -rf deps _build mix.lock, reinstalling elixir via asdf. I am running out of ideas now. Any help is appreciated.

===> Compiling src/rabbit_heartbeat.erl failed
src/rabbit_heartbeat.erl:22:39: syntax error before: ‘maybe’

rabbit_heartbeat.erl:20:2: type heartbeaters() undefined
rabbit_heartbeat.erl:32:13: type heartbeaters() undefined
rabbit_heartbeat.erl:38:13: type heartbeaters() undefined
rabbit_heartbeat.erl:49:21: type heartbeaters() undefined
rabbit_heartbeat.erl:50:22: type heartbeaters() undefined

** (Mix) Could not compile dependency :rabbit_common, “/Users/ranbirs/.asdf/installs/elixir/1.17.3-otp-26/.mix/elixir/1-17/rebar3 bare compile --paths /Users/ranbirs/workspace/carts-api-bk2/carts-api/_build/dev/lib/*/ebin” command failed. Errors may have been logged above. You can recompile this dependency with “mix deps.compile rabbit_common --force”, update it with “mix deps.update rabbit_common” or clean it with “mix deps.clean rabbit_common”

Most Liked

D4no0

D4no0

Currently the erlang AMQP client (and subsequent dependencies) don’t support OTP-27, the only option is to downgrade to OTP-26.

Here is the official link: Erlang Version Requirements | RabbitMQ

PS: I think there was somewhere a more detailed explanation on what it specifically breaks, but I cannot find it now.

hauleth

hauleth

maybe in Erlang is enabled by default only since OTP 27, earlier you need to use some flag to enable it, but I am not sure how you can do it in Mix for dependencies.

lud

lud

Hello @rsshek, welcome to the forums :slight_smile:

Can you upgrade to OTP 27? The maybe keyword will be supported out of the box.

Otherwise, can you try with this environment ERL_FLAGS='-enable-feature maybe_expr'?

dimitarvp

dimitarvp

I missed the Erlang version bit (serves me right for reading through the phone on the bed). Just upgrade to Erlang 27 and try it.

rsshek

rsshek

yes tried. same error

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
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
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
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
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
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
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
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
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

We're in Beta

About us Mission Statement