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!

Last Post!

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

vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
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
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

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
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement