Compile cowlib failed when mix ecto.create

I followed guide to new a hello project. In up and running step, I met

> MIX_DEBUG=1 mix ecto.create
** Running mix loadconfig (inside Hello.MixProject)
** Running mix deps.loadpaths (inside Hello.MixProject)
** Running mix deps.precompile (inside Hello.MixProject)
===> Compiling cowlib
** (Mix.Error) Could not compile dependency :cowlib, "$HOME/.mix/rebar3 bare compile --paths="$HOME/hello/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile cowlib", update it with "mix deps.update cowlib" or clean it with "mix deps.clean cowlib"
    (mix 1.11.3) lib/mix.ex:436: Mix.raise/1
    (elixir 1.11.3) lib/file.ex:1553: File.cd!/2
    (mix 1.11.3) lib/mix/tasks/deps.compile.ex:281: Mix.Tasks.Deps.Compile.do_command/5
    (mix 1.11.3) lib/mix/tasks/deps.compile.ex:98: anonymous fn/4 in Mix.Tasks.Deps.Compile.compile/2
    (elixir 1.11.3) lib/enum.ex:1411: Enum."-map/2-lists^map/1-0-"/2
    (mix 1.11.3) lib/mix/tasks/deps.compile.ex:79: Mix.Tasks.Deps.Compile.compile/2
    (mix 1.11.3) lib/mix/tasks/deps.loadpaths.ex:89: Mix.Tasks.Deps.Loadpaths.deps_check/2
    (mix 1.11.3) lib/mix/tasks/deps.loadpaths.ex:28: Mix.Tasks.Deps.Loadpaths.run/1

version is:

> elixir -v
Erlang/OTP 23 [erts-11.1.6] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

Elixir 1.11.3 (compiled with Erlang/OTP 23)

what should I do for find out problem?

What is the output of running the command above? That a might give a clearer idea of the issue.

> MIX_DEBUG=1 mix deps.compile cowlib
** Running mix loadconfig (inside Hello.MixProject)
** Running mix deps.compile cowlib (inside Hello.MixProject)
** Running mix archive.check cowlib (inside Hello.MixProject)
** Running mix deps.precompile (inside Hello.MixProject)
===> Compiling cowlib
** (Mix.Error) Could not compile dependency :cowlib, "$HOME/.mix/rebar3 bare compile --paths="$HOME/hello/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile cowlib", update it with "mix deps.update cowlib" or clean it with "mix deps.clean cowlib"
    (mix 1.11.3) lib/mix.ex:436: Mix.raise/1
    (elixir 1.11.3) lib/file.ex:1553: File.cd!/2
    (mix 1.11.3) lib/mix/tasks/deps.compile.ex:281: Mix.Tasks.Deps.Compile.do_command/5
    (mix 1.11.3) lib/mix/tasks/deps.compile.ex:98: anonymous fn/4 in Mix.Tasks.Deps.Compile.compile/2
    (elixir 1.11.3) lib/enum.ex:1411: Enum."-map/2-lists^map/1-0-"/2
    (mix 1.11.3) lib/mix/tasks/deps.compile.ex:79: Mix.Tasks.Deps.Compile.compile/2
    (mix 1.11.3) lib/mix/task.ex:394: Mix.Task.run_task/3
    (mix 1.11.3) lib/mix/cli.ex:84: Mix.CLI.run_task/2

I ran into this problem on a small vm. I was running out of memory. Added a swap file to fix.

Bingo.
I used these instructions for the swap file