albin

albin

Igniter new project error when using `--with phx.new`

% mix igniter.new helpdesk \
  --install ash,ash_postgres \
  --with phx.new \
  --extend postgres
* creating helpdesk/lib/helpdesk/application.ex
* creating helpdesk/lib/helpdesk.ex
* creating helpdesk/lib/helpdesk_web/controllers/error_json.ex
* creating helpdesk/lib/helpdesk_web/endpoint.ex
* creating helpdesk/lib/helpdesk_web/router.ex
* creating helpdesk/lib/helpdesk_web/telemetry.ex
* creating helpdesk/lib/helpdesk_web.ex
* creating helpdesk/mix.exs
* creating helpdesk/README.md
* creating helpdesk/.formatter.exs
* creating helpdesk/.gitignore
* creating helpdesk/test/support/conn_case.ex
* creating helpdesk/test/test_helper.exs
* creating helpdesk/test/helpdesk_web/controllers/error_json_test.exs
* creating helpdesk/lib/helpdesk/repo.ex
* creating helpdesk/priv/repo/migrations/.formatter.exs
* creating helpdesk/priv/repo/seeds.exs
* creating helpdesk/test/support/data_case.ex
* creating helpdesk/lib/helpdesk_web/controllers/error_html.ex
* creating helpdesk/test/helpdesk_web/controllers/error_html_test.exs
* creating helpdesk/lib/helpdesk_web/components/core_components.ex
* creating helpdesk/lib/helpdesk_web/controllers/page_controller.ex
* creating helpdesk/lib/helpdesk_web/controllers/page_html.ex
* creating helpdesk/lib/helpdesk_web/controllers/page_html/home.html.heex
* creating helpdesk/test/helpdesk_web/controllers/page_controller_test.exs
* creating helpdesk/lib/helpdesk_web/components/layouts/root.html.heex
* creating helpdesk/lib/helpdesk_web/components/layouts/app.html.heex
* creating helpdesk/lib/helpdesk_web/components/layouts.ex
* creating helpdesk/priv/static/images/logo.svg
* creating helpdesk/lib/helpdesk/mailer.ex
* creating helpdesk/lib/helpdesk_web/gettext.ex
* creating helpdesk/priv/gettext/en/LC_MESSAGES/errors.po
* creating helpdesk/priv/gettext/errors.pot
* creating helpdesk/priv/static/robots.txt
* creating helpdesk/priv/static/favicon.ico
* creating helpdesk/assets/js/app.js
* creating helpdesk/assets/vendor/topbar.js
* creating helpdesk/assets/css/app.css
* creating helpdesk/assets/tailwind.config.js

Fetch and install dependencies? [Yn]
* running mix deps.get
* running mix assets.setup
* running mix deps.compile

We are almost there! The following steps are missing:

    $ cd helpdesk

Then configure your database in config/dev.exs and run:

    $ mix ecto.create

Start your Phoenix app with:

    $ mix phx.server

You can also run your app inside IEx (Interactive Elixir) as:

    $ iex -S mix phx.server

    warning: redefining module Helpdesk.MixProject (current version defined in memory)
    │
  1 │ defmodule Helpdesk.MixProject do
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ mix.exs:1: Helpdesk.MixProject (module)

** (FunctionClauseError) no function clause matching in Igniter.Code.Function.move_to_function_call_in_current_scope/4

    The following arguments were given to Igniter.Code.Function.move_to_function_call_in_current_scope/4:

        # 1
        {:ok, #Sourceror.Zipper<
           #...
           {:__block__, [], [{:use, [trailing_comments: [], leading_comments: [], end_of_expression: [newlines: 1, line: 4, column: 36], line: 2, column: 3], [AshPostgres.Repo, [{{:__block__, [trailing_comments: [], leading_comments: [], format: :keyword, line: 3, column: 5], [:otp_app]}, {:__block__, [trailing_comments: [], leading_comments: [], line: 3, column: 14], [:helpdesk]}}]]}, {:def, [trailing_comments: [], leading_comments: [], end_of_expression: [newlines: 1, line: 4, column: 4], do: [line: 1, column: 26], end: [line: 4, column: 1], line: 1, column: 1], [{:installed_extensions, [trailing_comments: [], leading_comments: [], line: 1, column: 5], nil}, [{{:__block__, [trailing_comments: [], leading_comments: [], line: 1, column: 26], [:do]}, {:__block__, [trailing_comments: [], leading_comments: [%{line: 2, text: "# Add extensions here, and the migration generator will install them.", column: 3, next_eol_count: 1, previous_eol_count: 1}], end_of_expression: [newlines: 1, line: 3, column: 20], closing: [line: 3, column: 19], line: 3, column: 3], [[{:__block__, [trailing_comments: [], leading_comments: [], delimiter: "\"", line: 3, column: 4], ["ash-functions"]}]]}}]]}]}
         >}

        # 2
        :defmodule

        # 3
        2

        # 4
        #Function<6.124466779/1 in Igniter.Code.Function.move_to_function_call_in_current_scope/3>

    Attempted function clauses (showing 3 out of 3):

        def move_to_function_call_in_current_scope(+zipper+, +name+, -[arity | arities]-, +predicate+)
        def move_to_function_call_in_current_scope(+_+, +_+, -[]-, +_+)
        def move_to_function_call_in_current_scope(-%Sourceror.Zipper{} = zipper-, +name+, +arity+, +predicate+)

    (igniter 0.3.19) lib/igniter/code/function.ex:85: Igniter.Code.Function.move_to_function_call_in_current_scope/4
    (igniter 0.3.19) lib/igniter/code/module.ex:482: Igniter.Code.Module.move_to_module_using/2
    (ash_postgres 2.2.1) lib/mix/tasks/ash_postgres.install.ex:347: Mix.Tasks.AshPostgres.Install.configure_min_pg_version_function/1
    (igniter 0.3.19) lib/igniter/code/module.ex:94: Igniter.Code.Module.find_and_update_module/3
    (igniter 0.3.19) lib/igniter/code/module.ex:29: Igniter.Code.Module.find_and_update_or_create_module/5
    (ash_postgres 2.2.1) lib/mix/tasks/ash_postgres.install.ex:14: Mix.Tasks.AshPostgres.Install.igniter/2
    (elixir 1.17.1) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
    (igniter 0.3.19) lib/igniter/util/install.ex:115: Igniter.Util.Install.run_installers/5

Most Liked

zachdaniel

zachdaniel

Creator of Ash

Thanks for the report, fixed in v2.2.2

zachdaniel

zachdaniel

Creator of Ash

Oops, thanks :slight_smile: fixed in v2.2.3

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: &lt;h1&gt;Create Post&lt;/h1&gt; &lt;%= ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43622 214
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement