8

Error message:

iex -S mix
    Eshell V7.0  (abort with ^G)
==> idna (compile)
Killed
** (Mix) Could not compile dependency idna, /root/.mix/rebar command failed. If you want to recompile this dependency, please run:
mix deps.compile idna

mix.exs

defmodule Wham.Mixfile do
  use Mix.Project

  def project do
    [app: :wham,
     version: "0.0.1",
     elixir: "~> 1.0",
     elixirc_paths: elixirc_paths(Mix.env),
     compilers: [:phoenix] ++ Mix.compilers,
     build_embedded: Mix.env == :prod,
     start_permanent: Mix.env == :prod,
     deps: deps]
  end

  # Configuration for the OTP application
  #
  # Type `mix help compile.app` for more information
  def application do
    [mod: {Wham, []},
     applications: [:phoenix, :phoenix_html, :cowboy, :logger,
                    :phoenix_ecto, :postgrex, :maru, :maru_swagger, :tzdata]]
  end

  # Specifies which paths to compile per environment
  defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
  defp elixirc_paths(_),     do: ["lib", "web"]

  # Specifies your project dependencies
  #
  # Type `mix help deps` for examples and options
  defp deps do
    [{:phoenix, "~> 1.0.2"},
     {:phoenix_ecto, "~> 1.1"},
     {:postgrex, ">= 0.0.0"},
     {:phoenix_html, "~> 2.1"},
     {:phoenix_live_reload, "~> 1.0", only: :dev},
     {:cowboy, "~> 1.0"},
     {:maru, "~>  0.8.1"},
     {:maru_swagger, "~> 0.5", only: :dev },
     {:comeonin, "~> 1.0"},
     {:timex, "~> 1.0.0-pre"}]
  end
end
edmilson
  • 81
  • 4
  • 6
    We found out the issue was that the server was running out of memory when compiling idna. – José Valim Oct 10 '15 at 20:50
  • 2
    As it stands, this question describes a very specific symptom that has really nothing to do with the cause (memory shortage) described in the comments. Since this is unlikely to yield a good answer, and even then will probably not help future visitors, I am voting to close this question. – Patrick Oscity Oct 11 '15 at 09:19
  • Sorry I agree with @PatrickOscity on this one; vote to close as well. – Onorio Catenacci Oct 12 '15 at 12:01
  • 2
    For what it's worth, your comments were very useful to me - I had the same issue after adding timex as a dependency to my Elixir project. Turns out that idna won't compile with only 512 MB of RAM, which is the default for Vagrant virtualboxes. I upped it to 1GB and it compiled fine. – sbrother Nov 13 '15 at 06:03
  • O.S: MacBook Ram: 6GB Processor: Core i7 when i use "timex" dependy I see this issue. Creating new question for this and here is the link http://stackoverflow.com/questions/36838824/could-not-compile-dependency-idna-after-adding-timex-dependency – KJ_kaka Apr 25 '16 at 11:09
  • @PatrickOscity FWIW I had this exact error when trying to deploy to a server with low memory and seeing the comment about lower memory solved the problem for me. I vote to keep it open. – Gerry Shaw Jan 04 '21 at 02:17

1 Answers1

1

I ran into the same error today and update rebar3 executable solve the issue.

Xiaobin Xu
  • 11
  • 1