3

Setup new project with command mix new project_name it setup everything without any error or warning message, cd to project and ran command iex -S mix it throws error

enter image description here

lib/helloworld.ex

defmodule Helloworld do
  @moduledoc """
  Documentation for `Helloworld`.
  """

  @doc """
  Hello world.

  ## Examples

      iex> Helloworld.hello()
      :world

  """
  def hello do
    :world
  end
end

Version installed on system

MacBook Pro M2 - OS 13.4.1
Terminal - Rosetta
OpenSSL 3.1.2 1 Aug 2023 (Library: OpenSSL 3.1.2 1 Aug 2023)
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit
Elixir 1.15.4 (compiled with Erlang/OTP 26)
Mix 1.15.4 (compiled with Erlang/OTP 26)
Node v18.15.0
NPM 9.5.0
6
  • That's strange. Can you edit the question and add the contents of lib/helloworld.ex? Commented Aug 7, 2023 at 8:07
  • @Dogbert updated question, lib/helloworld.ex has default content generated by mix Commented Aug 7, 2023 at 8:25
  • What's really strange is that the error is in the @ processing in Helloworld, and yet the closed module reported in the error is Helloworld.MixProject 😩 Commented Aug 7, 2023 at 18:56
  • For shits and giggles, throw up your mix.exs Commented Aug 7, 2023 at 18:57
  • @Dogbert Is it miss configuration of elixir? I followed this to setup elixir on MacOs m2 stackoverflow.com/a/71000268/11141189 Commented Aug 8, 2023 at 8:01

2 Answers 2

1

I was trying to install elixir on Rosetta terminal, and after switching to native terminal, was getting same error, so uninstalled everything related to elixir from Rosetta terminal, and on native terminal installed homebrew and followed https://elixir-lang.org/install.html#macos

Make sure all required dependencies must be installed with same homebrew

Sign up to request clarification or add additional context in comments.

Comments

-1

I think you can follow this instruction to install elixir for MacOS: https://elixir-lang.org/install.html#macos

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.