Не удается запустить микс ecto.setup - PullRequest
0 голосов
/ 24 февраля 2020

Я получил проект, в котором уже есть много эликсира и JS кода. У меня нет никакого опыта в Elixir, но мне нужно попытаться исправить некоторые ошибки.

Я изо всех сил пытаюсь настроить проект на моей машине windows. Erlang, Elixir и Postgres успешно установлены, и я также могу успешно запустить mix deps.get.

Но когда я запускаю mix ecto.setup, я получаю:

$ mix ecto.setup
==> bcrypt_elixir
could not compile dependency :bcrypt_elixir, "mix compile" failed. You can recompile this dependency with "mix deps.compile bcrypt_elixir", update it with "mix deps.update bcrypt_elixir" or clean it with "mix deps.clean bcrypt_elixir"
==> boilerplate
** (Mix) "nmake" not found in the path. If you have set the MAKE environment variable,
please make sure it is correct.

Все, что я нахожу в Интернете, - это ошибки, связанные с установкой Visual Studio или C ++, что, я думаю, здесь не так, как он установлен и mix deps.get работает хорошо.

Вот файл mix.exs:

defmodule Boilerplate.Mixfile do
  use Mix.Project

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

  # Configuration for the OTP application.
  #
  # Type `mix help compile.app` for more information.
  def application do
    [
      mod: {Boilerplate.Application, []},
      extra_applications: [:logger, :runtime_tools, :comeonin]
    ]
  end

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

  # Specifies your project dependencies.
  #
  # Type `mix help deps` for examples and options.
  defp deps do
    [
      {:phoenix, "~> 1.3.4"},
      {:phoenix_pubsub, "~> 1.1"},
      {:phoenix_ecto, "~> 3.5"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 2.12"},
      {:phoenix_live_reload, "~> 1.1", only: :dev},
      {:gettext, "~> 0.16"},
      {:credo, "~> 0.10", only: [:dev, :test], runtime: false},
      {:cowboy, "~> 1.1"},
      {:comeonin, "~> 4.1"},
      {:bcrypt_elixir, "~> 1.1"},
      {:plug_cowboy, "~> 1.0"},
      {:guardian, "~> 1.1"},
      {:timex, "~> 3.1"},
      {:floki, "~> 0.20.0"},
      {:httpoison, "~> 1.4"},
      {:porcelain, "~> 2.0"},
      {:edeliver, "~> 1.4.2"},
      {:distillery, "~> 1.4"},
      {:logger_file_backend, "~> 0.0.10"},
      {:scrivener_ecto, "~> 1.0"},
    ]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  # For example, to create, migrate and run the seeds file at once:
  #
  #     $ mix ecto.setup
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    [
      "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
      "ecto.reset": ["ecto.drop", "ecto.setup"],
      test: ["ecto.create --quiet", "ecto.migrate", "test"]
    ]
  end
end

Редактировать:

Это результаты работы deps.compile bcrypt_elixir

$ mix deps.compile bcrypt_elixir
==> bcrypt_elixir
could not compile dependency :bcrypt_elixir, "mix compile" failed. You can recompile this dependency with "mix deps.compile bcrypt_elixir", update it with "mix deps.update bcrypt_elixir" or clean it with "mix deps.clean bcrypt_elixir"
==> boilerplate
** (Mix) "nmake" not found in the path. If you have set the MAKE environment variable,
please make sure it is correct.
...