简体   繁体   中英

Hex tasks not found in list of mix tasks

I have a very simple project and I am trying to publish the first version to hex. However I cannot run the hex.publish task.

I get the error ** (Mix) The task "hex.publish" could not be found.

I am following these hex instructions .

My mix.exs file looks like the following.

defmodule Ace.Mixfile do
  use Mix.Project

  def project do
    [app: :ace,
     version: "0.2.0",
     elixir: "~> 1.0",
     build_embedded: Mix.env == :prod,
     start_permanent: Mix.env == :prod,
     deps: deps]
  end

  def application do
    [
      applications: [:logger],
      mod: {Ace, []}
    ]
  end

  defp deps do
    []
  end
end

You might not have hex installed. According to hex usage , please use

mix local.hex

in your terminal or CMD console. Then mix hex.publish should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM