cannot create mix package

I tried creating a package using

mix new test

i get the following terminal error

(Mix) Application name must start with a letter and have only lowercase letters, numbers and underscore, got: "test". The application name is inferred from the path, if you'd like to explicitly name the application then use the "--app APP" option.

as far as I can tell ‘test’ fits this format perfectly fine. Am i missing a step or did i configure something wrong?

1 Like

Yes, that fits the description pretty well, and the command even works on my side.

Could you please check your Erlang and elixir versions?

elixir --version
erl -version

Mine is Elixir 1.8.1 running on an ERTS 10.3 (OTP 21.3)

this is really strange, Erlang is 9.2 butelixir --version crashes at the end when before it displays my elixir version

Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:10] [kernel-poll:false]

{"init terminating in do_boot",{{badmatch,error},[{'Elixir.System',build,0,[{file,"lib/system.ex"},{line,172}]},{'Elixir.System',build_info,0,[{file,"lib/system.ex"},{line,164}]},{'Elixir.Kernel.CLI',parse_shared,2,[{file,"lib/kernel/cli.ex"},{line,153}]},{'Elixir.Kernel.CLI','shared_option?',3,[{file,"lib/kernel/cli.ex"},{line,113}]},{'Elixir.Kernel.CLI',main,1,[{file,"lib/kernel/cli.ex"},{line,14}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({{badmatch,error},[{Elixir.System,build,0,[{_},{_}]},{Elixir.System,build_info,0,[{_},{_}]},{Elixir.Kernel.CLI,parse_shared,2,[{_},{_}]},{Elixir.Kernel.CLI,shared_option?,

Crash dump is being written to: erl_crash.dump...done

This is a clear hint on having installed a version of elixir that was not meant to run on or built to support OTP 20.

Can you please tell how you have installed Erlang and elixir and what operating system you are using?

1 Like

I’m on ubuntu mate and i just installed elixir using its apt-get

Sadly especially on ubuntu I can’t recommend apt-get installing from the standard repositories for about anything regarding programming languages :frowning:

I’d recommend following the elixir install guide which adds a ppa or even better asdf - the version manager of all version managers with elixir and erlang plugins. I use it for everything for 2.5 years - including postgres.


Can you tell me what the package versions are? This seems to be a bug in Ubuntu’s repositories.

Still I have to second @PragTob s suggestion. asdf-vm is probably your best bet when installing any programming language.


ok so after an hour of copy pasting commands i got erlang and elixir installed through asdf. mix new works as intended. I accidently installed an older version erlang so now im stuck with

Erlang/OTP 19 [erts-8.0.2] [source] [64-bit] [smp:6:6] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.7.4 (compiled with Erlang/OTP 19)

but whatever I’ll install the newer versions later. Thanks a lot guys!

Just do

asdf install erlang 21.2.7
asdf install elixir 1.8.1-otp-21

And then repeat the above with asdf local (or global) instead of install - then you should be set with all the newest versions :star2: