phenixdigital / phoenix_storybook

A pluggable storybook for your Phoenix components.
MIT License
672 stars 53 forks source link

Fails to run `mix phx.gen.storybook` on phoenix `1.7.3` #312

Closed jakelacey2012 closed 1 year ago

jakelacey2012 commented 1 year ago

After following some initial steps in https://hexdocs.pm/phx_live_storybook/setup.html I am failing to run mix phx.gen.storybook, I get the following output.

➜  xxxx git:(main) mix deps.get
Resolving Hex dependencies...
Resolution completed in 0.22s
Unchanged:
  bcrypt_elixir 3.0.1
  castore 1.0.3
  comeonin 5.3.3
  cowboy 2.10.0
  cowboy_telemetry 0.4.0
  cowlib 2.12.1
  db_connection 2.5.0
  decimal 2.1.1
  ecto 3.10.3
  ecto_sql 3.10.1
  elixir_make 0.7.7
  esbuild 0.7.1
  expo 0.4.1
  file_system 0.2.10
  finch 0.16.0
  floki 0.34.3
  gettext 0.22.3
  hpax 0.1.2
  jason 1.4.1
  mime 2.0.5
  mint 1.5.1
  nimble_options 1.0.2
  nimble_pool 1.0.0
  phoenix 1.7.6
  phoenix_ecto 4.4.2
  phoenix_html 3.3.1
  phoenix_live_dashboard 0.8.0
  phoenix_live_reload 1.4.1
  phoenix_live_view 0.19.3
  phoenix_pubsub 2.1.3
  phoenix_template 1.0.1
  plug 1.14.2
  plug_cowboy 2.6.1
  plug_crypto 1.2.5
  postgrex 0.17.1
  ranch 1.8.0
  swoosh 1.11.3
  tailwind 0.2.1
  telemetry 1.2.1
  telemetry_metrics 0.6.1
  telemetry_poller 1.0.0
  websock 0.5.2
  websock_adapter 0.5.3
New:
  earmark 1.4.38
  earmark_parser 1.4.33
  makeup 1.1.0
  makeup_eex 0.1.1
  makeup_elixir 0.16.1
  makeup_html 0.1.1
  nimble_parsec 1.3.1
  phx_live_storybook 0.4.5
* Updating phoenix_template (Hex package)
➜  xxxx git:(main) ✗ mix phx.gen.storybook
==> phoenix_template
Compiling 4 files (.ex)
Generated phoenix_template app
==> phoenix
Compiling 71 files (.ex)
Generated phoenix app
==> phoenix_live_reload
Compiling 4 files (.ex)
Generated phoenix_live_reload app
==> phoenix_live_view
Compiling 35 files (.ex)
Generated phoenix_live_view app
==> phoenix_live_dashboard
Compiling 36 files (.ex)
Generated phoenix_live_dashboard app
==> phx_live_storybook
Compiling 41 files (.ex)
warning: variable "f" does not exist and is being expanded to "f()", please use parentheses to remove the ambiguity or change the variable name
  lib/phx_live_storybook/live/search.ex:57: PhxLiveStorybook.Search.render/1

warning: variable "f" does not exist and is being expanded to "f()", please use parentheses to remove the ambiguity or change the variable name
  lib/phx_live_storybook/live/search.ex:61: PhxLiveStorybook.Search.render/1

warning: passing a string as a layout template in use options is deprecated, please pass {PhxLiveStorybook.LayoutView, :live} instead of {PhxLiveStorybook.LayoutView, "live.html"}
  (phoenix_live_view 0.19.3) lib/phoenix_live_view/utils.ex:207: Phoenix.LiveView.Utils.normalize_layout/2
  (phoenix_live_view 0.19.3) lib/phoenix_live_view.ex:497: Phoenix.LiveView."MACRO-__before_compile__"/2
  (elixir 1.14.5) src/elixir_dispatch.erl:224: :elixir_dispatch.expand_macro_fun/7
  (elixir 1.14.5) src/elixir_dispatch.erl:211: :elixir_dispatch.expand_require/6
  (elixir 1.14.5) src/elixir_dispatch.erl:135: :elixir_dispatch.dispatch_require/7
  (elixir 1.14.5) src/elixir_module.erl:412: :elixir_module.expand_callback/6

warning: variable "f" does not exist and is being expanded to "f()", please use parentheses to remove the ambiguity or change the variable name
  lib/phx_live_storybook/live/story_live.ex:231: PhxLiveStorybook.StoryLive.render_navigation_tabs/2

warning: variable "f" does not exist and is being expanded to "f()", please use parentheses to remove the ambiguity or change the variable name
  lib/phx_live_storybook/live/story_live.ex:232: PhxLiveStorybook.StoryLive.render_navigation_tabs/2

warning: undefined function f/0 (expected PhxLiveStorybook.Search to define such a function or for it to be imported, but none are available)
  lib/phx_live_storybook/live/search.ex:61

warning: variable "f" does not exist and is being expanded to "f()", please use parentheses to remove the ambiguity or change the variable name
  lib/phx_live_storybook/live/story/playground.ex:293: PhxLiveStorybook.Story.Playground.render_lower_tab_content/1

warning: variable "f" does not exist and is being expanded to "f()", please use parentheses to remove the ambiguity or change the variable name
  lib/phx_live_storybook/live/story/playground.ex:336: PhxLiveStorybook.Story.Playground.render_lower_tab_content/1

== Compilation error in file lib/phx_live_storybook/live/search.ex ==
** (CompileError) lib/phx_live_storybook/live/search.ex:57: undefined function f/0 (expected PhxLiveStorybook.Search to define such a function or for it to be imported, but none are available)

could not compile dependency :phx_live_storybook, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile phx_live_storybook", update it with "mix deps.update phx_live_storybook" or clean it with "mix deps.clean phx_live_storybook"
cblavier commented 1 year ago

Hey Jake, I'll try to reproduce it today and let you know if I figure out your issue

cblavier commented 1 year ago

sorry, I can't reproduce it, but It seems you are using deprecated phx_live_storybook which has been superseded by phoenix_storybook 0.5

Let me know if it helps

In the meantime, I will deprecate phx_live_storybook from hex

cblavier commented 1 year ago

Is it ok for you @jakelacey2012? Can I close the issue?

jakelacey2012 commented 1 year ago

Yeah this is fixed now, thanks for checking in.