Mix is a build tool that provides tasks for creating, compiling, testing Elixir projects, as well as handle dependencies, and more.
Questions tagged [elixir-mix]
339 questions
1
vote
2 answers
How to flag a module so that it doesn't get compiled?
Is it possible to not compile a module or file that's found under the lib directory when running mix.compile?
If so, how to do it or at least where in Mix's source can I look to find that out?

Gjaldon
- 5,534
- 24
- 32
1
vote
1 answer
Use Beam files to start an application in Elixir
I am working on Elixir project where i have to register three dependencies say "xxx, yyy & zzz" for the project. I have done deps.get on those repositories and compiled that. But, i checked after compilation no ".app" file is generated for xxx…

Coder
- 428
- 4
- 16
1
vote
2 answers
Miguel Camba tutorial Elixir shortcut function error
I am following the Miguel Camba tutorial on Elixir lang.
Everything is ok until I try to utilize the following snippet:
get "/play/:story_name" do
conn = conn.resp_content_type("text/event-stream")
conn = conn.send_chunked(200)
iterator…

aug2uag
- 3,379
- 3
- 32
- 53
0
votes
1 answer
Elixir compilation error: module ExUnitProperties is not loaded and could not be found
I upgraded the version of elixir from 1.7.4 to 1.15 and now I am trying to run MIX_ENV=test mix test and I keep getting an error module ExUnitProperties is not loaded and could not be found My mix.exs has {:stream_data, "~> 0.1", only: :test,…

ejgreenwald
- 172
- 4
- 16
0
votes
1 answer
Phoenix Persistent Builds Issue: Dependencies Recompiling Every Time
When I run mix commands in my project, it seems that Elixir recompiles all the dependencies every single time, making the development process slower than expected. However, I noticed that when I develop the same project within a Docker container,…

Mr. Ukasha
- 1
- 2
0
votes
1 answer
How to use Application and Plug.Router to listen on port with Elixir
I have this Application file:
defmodule MyApi do
use Application
def start(_type, _args) do
children = [
MyApi.Router
]
opts = [strategy: :one_for_one, name: MyApi.Supervisor]
Supervisor.start_link(children, opts)
…

Alexander Mills
- 90,741
- 139
- 482
- 817
0
votes
1 answer
Pattern for generating names at command line when using mix to create an app skeleton
I am trying to learn Elixir and am using mix to generate a basic RestFul API skeleton:
% mix new MyApi --module MyApi
I get an error:
** (Mix) Application name must start with a lowercase ASCII letter, followed by lowercase ASCII letters, numbers,…

Alexander Mills
- 90,741
- 139
- 482
- 817
0
votes
1 answer
(SyntaxError) mix.exs:50:7: syntax error before: '{'
I am trying to add the mnemonic_slugs library into my mix.exs file but I keep getting the error
** (SyntaxError) mix.exs:50:7: syntax error before: '{'
|
50 | {:mnemonic_slugs, "~> 0.0.3"}
| ^
(mix 1.15.3)…

Pickle
- 27
- 1
- 7
0
votes
1 answer
Hi, I had created Elixir project with phoenix framework. there is yaml file when i build that file i get this error
== Compilation error in file lib/ecto/query.ex ==
** (Kernel.TypespecError) lib/ecto/query.ex:428: type dynamic/0 is a built-in type and it cannot be redefined
(elixir 1.15.0) lib/kernel/typespec.ex:961: Kernel.Typespec.compile_error/2
…
0
votes
1 answer
Mix edeliver doesn't seem to recognize updates to my mix.exs file
I just updated Elixir on my application and I’m trying to use the command mix edeliver build release --branch="$CURRENT_BRANCH" --auto-version=build-date+build-time+git-branch+git-revision to build a release, but it keeps telling me my mix.exs file…
0
votes
2 answers
How to pass named arguments into a Mix Task?
I have this code:
defmodule Mix.Tasks.Echo do
use Mix.Task
@impl Mix.Task
def run(args) do
IO.puts("running!")
Mix.shell().info(Enum.join(args, " "))
IO.inspect(args, label: "Received args")
end
end
Which can be used like…

Duminamonri
- 37
- 4
0
votes
2 answers
Creating an Elixir project generates: [error] beam/beam_load.c(148): Error loading module 'Elixir.Hex'
In the terminal
elixir -v returns:
"Elixir 1.14.3 (compiled with Erlang/OTP 25)"
The above error msg. comes with the instruction to " please re-compile this module with an Erlang/OTP 25 compiler".
I also get this error:
"[error] Loading of…

Don Fox
- 1
- 4
0
votes
0 answers
Change FileStat.ctime in Elixir
I intend to do sorting of files by date. To test my function I created an environment with a Stream with File.Stats which is represented as the follwing:
@type t() :: %File.Stat{
access: :read | :write | :read_write | :none,
atime:…

CKP
- 1
- 1
0
votes
1 answer
Elixir: VS Code ExUnit cannot find Mix
I cannot load or run my tests, from within VS Code.
I'm a new user to Elixir, and to VS Code. I'm running Lubuntu 21.10 (Impish). I've downloaded Erlang/OTP 25 (.deb), and Elixir 1.14 (precompiled binary in /usr/share/elixir), and can get anything I…

Greg M. Krsak
- 2,102
- 1
- 18
- 28
0
votes
2 answers
(Mix) Hex dependency resolution failed
I'm new to phoenix and elixir... I'm trying to get the dependencies and when I run the following command, I get the error. Am I missing something? Still trying to figure it out what the actual error means?
mix deps.get ueberauth_auth0
Resolving Hex…

tmariaz
- 57
- 1
- 5