I am getting a message while using the ash_phoenix generator
if Layouts.app causes a problem, you may be on an older version of the generators
The command I am using is -
mix ash_phoenix.gen.live --domain Dci.Accounts --resource MyApp.Accounts.Organisation --resourceplural organisations
My question is -
How can I use newer version of generators?
I have updated everything - elixir, phoenix, all dependencies
There is some documentation here - Live layouts β Phoenix LiveView v1.0.17, which looks related to the issue. But I am not able to understand it and fix the issue.
Thanks!
1 Like
- Re-run the generator after the layout update
mix ash_phoenix.gen.live \
--domain Dci.Accounts \
--resource MyApp.Accounts.Organisation \
--resourceplural organisations
I did regenerate the files after update, but there is no change.
I think, it is expecting a change in app.html.heex
file or my_app_web.ex
file.
I have also created a new phoenix project to manually compare the files. But I cannot figure out what it is.
@explorer-trail
kindly ensure your project is using
Phoenix 1.7+ layout structure
If you generated your Phoenix project before 1.7, the layout folder may be outdated.
It does generate the new ones. Itβs just a notice because of the transition. Should be fine. Do generated files work?
edit: Wait, just to check, you are using a release candidate, 1.8 Phoenix?
There is an option you can pass for the generator command:
`--phx-version` - Phoenix version 1.7 (old) or 1.8 (new). Defaults to 1.8
1 Like
It seems that since ash_phoenix 2.3.x
onwards points to Phoenix 1.8 rc
by default, which brings many changes to the components.
Using --phx-version
is working. It uses Phonix 1.7.x components
Full command =
mix ash_phoenix.gen.live --domain Dci.Accounts --resource MyApp.Accounts.Organisation --resourceplural organisations --phx-version v1.7.21
Thank you
2 Likes