Igniter 0.5.1 fail: (UndefinedFunctionError) function Installer.Lib.Private.SharedUtils.install/1 is undefined or private

The new release of Igniter might fail, since this issue was just happened to me:
(I’d like to upload an image, but I’m a new user)

asdf@897471af8b62:/tmp$ mix igniter.new toy_bank --install ash --extend ets
* creating README.md
* creating .formatter.exs
* creating .gitignore
* creating mix.exs
* creating lib
* creating lib/toy_bank.ex
* creating test
* creating test/test_helper.exs
* creating test/toy_bank_test.exs

Your Mix project was created successfully.
You can use "mix" to compile it, test it, and more:

    cd toy_bank
    mix test

Run "mix help" for more commands.
** (UndefinedFunctionError) function Installer.Lib.Private.SharedUtils.install/1 is undefined or private
    (igniter 0.5.1) Installer.Lib.Private.SharedUtils.install(["ash", "--extend", "ets"])
    (mix 1.17.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    lib/mix/tasks/igniter.new.ex:202: Mix.Tasks.Igniter.New.run/1
    (mix 1.17.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.3) lib/mix/cli.ex:96: Mix.CLI.run_task/2
    /home/asdf/.asdf/installs/elixir/1.17.3-otp-27/bin/mix:2: (file)
asdf@897471af8b62:/tmp$ asdf list
elixir
 *1.17.3-otp-27
erlang
 *27.1.2
nodejs
 *23.1.0
asdf@897471af8b62:/tmp$ 

Actually, I tried many erlang/elixir versions, and all fail.

Is there a way to use previous version of Igniter? I did not find a way to do so in this forum.

Please help.

1 Like

Looking into this now.

Please install the latest archive of igniter_new to resolve the issue:

mix archive.install hex igniter_new 
1 Like

Great! It works now, thanks a lot!

I’m running into this issue as well, but installing the latest igniter_new does not help :sweat_smile:

Oh, actually it’s a slightly different error

function Installer.Lib.Private.SharedUtils.igniter_version/0 is undefined (module Installer.Lib.Private.SharedUtils is not available)

You should also mix deps.update igniter in your projects. In addition, double check that you’ve truly updated your archive. If you are using something my like asdf, mix archives are installed per elixir version, meaning that your igniter_new version can change depending on your directory.

I’m also having a similar issue. Carried out the above command - which installs version 0.5.2.

Then used the command

mix igniter.new helpdesk \
  --install ash,ash_postgres,ash_phoenix \
  --with phx.new \
  --extend postgres \
  --example

Get the error

Failed to add igniter to mix.exs. Please add it manually and try again

For more information, see: https://hexdocs.pm/igniter/readme.html#installation

I saw your webcast with Peter Ullrich which prompted me to try Ash - I think the concept of completely separating the business layer is awesome - reminded me of Prag Dave’s philosophy expounded in his course.

Appreciate the huge efforts you’ve put in to implement all this and make it freely available to the community.

Running

helpdesk mix igniter.install ash,ash_postgres,ash_phoenix 

gives the error

** (UndefinedFunctionError) function Installer.Lib.Private.SharedUtils.igniter_version/0 is undefined (module Installer.Lib.Private.SharedUtils is not available)
    (igniter 0.5.2) Installer.Lib.Private.SharedUtils.igniter_version()
    (igniter 0.5.2) lib/mix/tasks/igniter.install.ex:86: Mix.Tasks.Igniter.Install.add_igniter_dep/1
    (igniter 0.5.2) lib/mix/tasks/igniter.install.ex:37: Mix.Tasks.Igniter.Install.run/1
    (mix 1.17.1) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.1) lib/mix/cli.ex:96: Mix.CLI.run_task/2

Yeah, there are a few things wrong with ar recent release. I’m working through them now.

1 Like

Hey folks, I’ve updated both the installer archive and igniter itself. Please update both (or just the installer if you don’t have a project using igniter yet) and try again.

This means updating the archive:

mix archive.install hex igniter_new

and the dep for any projects that have igniter in it

mix deps.update igniter
2 Likes

:pray: Thank you!.

I can report that it now works like a charm! :smiley:

1 Like