akira / exq_ui

UI Dashboard for Exq, a job processing library for Elixir. Exq UI provides the UI dashboard to display stats on job processing.
Other
154 stars 73 forks source link

I can't compile project when using phoenix 1.7.6 and phoenix_live_view 0.19 #144

Closed munjalpatel closed 1 year ago

munjalpatel commented 1 year ago

Here is my mix.exs

defmodule TheApp.MixProject do
  use Mix.Project

  def project do
    [
      app: :theapp,
      version: "0.1.0",
      build_path: "../../_build",
      config_path: "../../config/config.exs",
      deps_path: "../../deps",
      lockfile: "../../mix.lock",
      elixir: "~> 1.14",
      elixirc_paths: elixirc_paths(Mix.env()),
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps()
    ]
  end

  # Configuration for the OTP application.
  #
  # Type `mix help compile.app` for more information.
  def application do
    [
      mod: {TheApp.Application, []},
      extra_applications: [:logger, :runtime_tools, :os_mon, :exq]
    ]
  end

  # Specifies which paths to compile per environment.
  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  # Specifies your project dependencies.
  #
  # Type `mix help deps` for examples and options.
  defp deps do
    [
      {:phoenix, "~> 1.7.6"},
      {:phoenix_html, "~> 3.3"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:phoenix_live_view, "~> 0.19.0"},
      {:floki, ">= 0.30.0", only: :test},
      {:phoenix_live_dashboard, "~> 0.8.0"},
      {:esbuild, "~> 0.7", runtime: Mix.env() == :dev},
      {:tailwind, "~> 0.2.0", runtime: Mix.env() == :dev},
      {:telemetry_metrics, "~> 0.6"},
      {:telemetry_poller, "~> 1.0"},
      {:jason, "~> 1.2"},
      {:plug_cowboy, "~> 2.6"},
      {:swoosh, "~> 1.11.4", runtime: Mix.env() == :dev},
      {:hackney, "~> 1.18"},
      {:cors_plug, "~> 3.0"},
      {:absinthe_client, "~> 0.1.0"},
      {:bcrypt_elixir, "~> 3.0"},
      {:exq, "~> 0.19.0"},
      {:exq_ui, "~> 0.13.0"}
    ]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    [
      setup: ["deps.get", "assets.setup", "assets.build"],
      "assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
      "assets.build": ["tailwind default", "esbuild default"],
      "assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"]
    ]
  end
end

And the error when I run mix compile --force

==> exq_ui
Compiling 27 files (.ex)

== Compilation error in file lib/exq_ui_web/live/busy_live/index.ex ==
 ** (CompileError) lib/exq_ui_web/live/busy_live/index.ex:3: module Phoenix.View is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module
     expanding macro: ExqUIWeb.__using__/1
     lib/exq_ui_web/live/busy_live/index.ex:3: ExqUIWeb.BusyLive.Index (module)
     (elixir 1.14.2) expanding macro: Kernel.use/2
 could not compile dependency :exq_ui, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile exq_ui", update it with "mix deps.update exq_ui" or clean it with "mix deps.clean exq_ui"
ananthakumaran commented 1 year ago

Could you try master branch. We recently added some fix for phoenix 1.7

munjalpatel commented 1 year ago

@ananthakumaran I did try all 3 of these:

The 3rd combination was able to compile fine. But then gave me all sorts of errors on runtime when trying to access /exq in the browser.

ananthakumaran commented 1 year ago

I need to debug then, if you downgrade phoenix_live_view it might work. I remember testing Phoenix 1.7 and it was working.

ananthakumaran commented 1 year ago

@munjalpatel could you try https://github.com/akira/exq_ui/pull/145, I was able to get it run locally with live_view 0.18/0.19