fireproofsocks

fireproofsocks

** (Mix) The task "coveralls" could not be found

I’m trying to install and run excoveralls in an umbrella app. Installation and compilation work just fine – I see the excoveralls folder inside dep and "0.16.0" inside the mix.lock. mix.exs includes:

{:excoveralls, "~> 0.16.0", only: [:dev], runtime: false},

However, when I try to run mix coveralls, I get

** (Mix) The task "coveralls" could not be found

Curiously, there is NOT a folder created inside of _build… which would explain why the mix task could not be found. But why didn’t this compile?

This is an umbrella app… the dependency was listed in the root mix.exs with the following modifier to the mix.exs:

test_coverage: [
        tool: ExCoveralls
      ],
      preferred_cli_env: [
        coveralls: :test,
        "coveralls.detail": :test
      ]

And I followed the documentation’s advice for umbrellas and added

test_coverage: [
        tool: ExCoveralls
      ],

to the other mix.exs files.

But still no dice.

The only thing that is unusual about this repository is that up till now, the built-in Erlang :cover library was being tapped to do coverage reports. We’d do this:

mix test --cover

So the only guess I have is that it’s somehow interfering with ExCoveralls, but I can’t pinpoint it. I have tried deleting the _build and deps directories, but the result is the same.

Anyone have ideas? Thanks in advance!

Marked As Solved

christhekeele

christhekeele

I believe you are only adding the :excoveralls dependency in :dev environments,

but you also want it available in the :test environment that mix test uses by default (and you are using in :preferred_cli_env). Try:

{:excoveralls, "~> 0.16.0", only: [:dev, :test], runtime: false},

Also Liked

fireproofsocks

fireproofsocks

oiy, I think you’re right. :man_facepalming:

I ended up trying this again in a fresh branch and the problem was gone. Thank you for input!

Where Next?

Popular in Questions Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
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
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

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
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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
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
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement