rsshek

rsshek

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”

Showing Posts 1 to 10

dimitarvp

dimitarvp

Have you tried mix deps.update rabbit_common and then attempting to compile again?

rsshek

rsshek OP

yes, same error persists.
I even tried git cloning into a new folder and installed deps from scratch but no luck.

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.

ruslandoga

ruslandoga

In addition to the above, here’s more info on maybe Expressions — Erlang System Documentation v29.0.2

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'?

rsshek

rsshek OP

I was running this app on erlang erlang 26.2.5.5 just tomorrow and before and it was working fine. But I will explore more to see if this what can I do here

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 OP

tried with OTP 27 as well (elixir 1.18.1-otp-27)
getting same error again.

** (Mix) Could not compile dependency :rabbit_common, "/Users/ranbirs/.asdf/installs/elixir/1.18.1-otp-27/.mix/elixir/1-18/rebar3 bare compile --paths /Users/ranbirs/workspace/carts-api-bk2/carts-api/_build/dev/lib/*/ebin" command failed.Preformatted text

lud

lud

Hum strange :thinking:

I have had the same error before but generally I clean everything and it works. Have you tried with the ERL_FLAGS variable?

rsshek

rsshek OP

yes tried. same error

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

jola
Wrote about how to safely run a globally unique process in an Elixir cluster, and a scary story from the past! Learn about :global for r...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews