using Mac os can’t run iex -S mix in a project
this is the error
Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] [dtrace]
** (Mix) “mix” with no arguments must be executed in a directory with a mix.exs file
Usage: mix [task]
what can i do to run it
Hello, welcome to the forum…
As mentionned, You need to be in the root folder of an Elixir application to do this.
The minimum viable reproduction is…
$ mix new koko
* creating README.md
* creating .formatter.exs
* creating .gitignore
* creating mix.exs
* creating config
* creating config/config.exs
* creating lib
* creating lib/koko.ex
* creating test
* creating test/test_helper.exs
* creating test/koko_test.exs
Your Mix project was created successfully.
You can use "mix" to compile it, test it, and more:
cd koko
mix test
Run "mix help" for more commands.
$ cd koko/
$ iex -S mix
Erlang/OTP 21 [erts-10.2.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Compiling 1 file (.ex)
Generated koko app
Interactive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>
To check if You have the file…
$ ls -l mix*
-rw-r--r-- 1 xxx staff 565 15 jul 16:29 mix.exs
4 Likes
thank you, that was my mistake
1 Like