phoenixframework / phoenix

Peace of mind from prototype to production
https://www.phoenixframework.org
MIT License
21.3k stars 2.87k forks source link

Phx.new with master branch is creating broken app #4930

Closed cvkmohan closed 2 years ago

cvkmohan commented 2 years ago

If a new application is created using https://github.com/phoenixframework/phoenix/blob/master/installer/README.md, we are getting a broken application. The error says unable to compile phoenix live dashboard. Unable to find assigns is the error shown.

kelvinst commented 2 years ago

I tried out just executing the install instruction from the mentioned README, run mix phx.new test, and mix compile and it actually worked. Can you link the Elixir and OTP version you're using? Also, maybe link the whole mix.lock file from the generated app?

cvkmohan commented 2 years ago

@kelvinst Thanks for the response. I created a new app and here is the link https://github.com/cvkmohan/new_app

elixir 1.14.0-rc.1-otp-25
erlang 25.0.4

elixir and erlang versions.

Here is the error log

==> phoenix_live_dashboard
Compiling 40 files (.ex)
warning: variable "assigns" is unused (if the variable is not meant to be used, prefix it with an underscore)
  lib/phoenix/live_dashboard/pages/request_logger_page.ex:75: Phoenix.LiveDashboard.RequestLoggerPage.render/1

warning: function sign/3 is unused
  lib/phoenix/live_dashboard/pages/request_logger_page.ex:173

warning: undefined function sigil_H/2 (expected Phoenix.LiveDashboard.RequestLoggerPage to define such a function or for it to be imported, but none are available)
  lib/phoenix/live_dashboard/pages/request_logger_page.ex:76

warning: undefined function assign/3 (expected Phoenix.LiveDashboard.RequestLoggerPage to define such a function or for it to be imported, but none are available)
  lib/phoenix/live_dashboard/pages/request_logger_page.ex:69

warning: undefined function assign/3 (expected Phoenix.LiveDashboard.RequestLoggerPage to define such a function or for it to be imported, but none are available)
  lib/phoenix/live_dashboard/pages/request_logger_page.ex:65

warning: undefined function assign/3 (expected Phoenix.LiveDashboard.RequestLoggerPage to define such a function or for it to be imported, but none are available)
  lib/phoenix/live_dashboard/pages/request_logger_page.ex:61

warning: undefined function assign/2 (expected Phoenix.LiveDashboard.RequestLoggerPage to define such a function or for it to be imported, but none are available)
  lib/phoenix/live_dashboard/pages/request_logger_page.ex:56

== Compilation error in file lib/phoenix/live_dashboard/pages/request_logger_page.ex ==
** (CompileError) lib/phoenix/live_dashboard/pages/request_logger_page.ex:22: undefined function assign/2 (expected Phoenix.LiveDashboard.RequestLoggerPage to define such a function or for it to be imported, but none are available)

could not compile dependency :phoenix_live_dashboard, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile phoenix_live_dashboard", update it with "mix deps.update phoenix_live_dashboard" or clean it with "mix deps.clean phoenix_live_dashboard"
cvkmohan commented 2 years ago

I think present master branches of phoenix and phoenix_live_view have some major reorg going on. If you put them in your mix file, we are getting errors.

chrismccord commented 2 years ago

Master is unreleased and we are indeed in the middle of work in several areas so this is expected. Thanks!