Unknown live option :layout when adding surface_catalogue to mix deps.
Closed this issue ยท 2 comments
Hi! I was inspired by @davydog187 to try surface catalog.
First time so please let me know if I can improve the issue or am not following the desired process ๐
I'm running into an issue on a mostly fresh phoenix umbrella app when I try to add the dependency.
{:surface_catalogue, "~> 0.1.0", only: :dev}
Then when I try to run the project it will not compile due to an ArgumentError
I still have to try running this on a fresh non-umbrella app to see if it's my project that's the problem.
Help appreciated! But I'm raising this issue so that if I find the solution I'll either submit a PR or document what change I needed to make on my project to fix it so that other folks experiencing the issue can benefit.
==> surface_catalogue
Compiling 19 files (.ex)
== Compilation error in file lib/surface/catalogue/server.ex ==
** (ArgumentError) unknown live option :layout.
Supported options include: :container, :as, :metadata, :private.
Got: [layout: {Surface.Catalogue.LayoutView, :root}]
(phoenix_live_view 0.16.4) lib/phoenix_live_view/router.ex:386: anonymous fn/1 in Phoenix.LiveView.Router.validate_live_opts!/1
(elixir 1.12.1) lib/enum.ex:930: Enum."-each/2-lists^foreach/1-0-"/2
(phoenix_live_view 0.16.4) lib/phoenix_live_view/router.ex:360: Phoenix.LiveView.Router.validate_live_opts!/1
(phoenix_live_view 0.16.4) lib/phoenix_live_view/router.ex:340: Phoenix.LiveView.Router.__live__/4
lib/surface/catalogue/server.ex:23: (module)
lib/surface/catalogue/server.ex:13: (module)
(stdlib 3.15.2) erl_eval.erl:685: :erl_eval.do_apply/6
could not compile dependency :surface_catalogue, "mix compile" failed. You can recompile this dependency with "mix deps.compile surface_catalogue", update it with "mix deps.update surface_catalogue" or clean it with "mix deps.clean surface_catalogue"
Hi @BrooklinJazz!
Since you're using LV v0.16.4
, you'll have to use the version on master:
{:surface_catalogue, github: "surface-ui/surface_catalogue", only: :dev}
and in case you're using VSCode, you should have:
{:surface_catalogue, github: "surface-ui/surface_catalogue", only: [:test, :dev]}
Let me know if that works for you.
That worked!
Also, I had to remove the surface dependency, because surface_catalogue already depends on it.
Thank you ๐