ash-project / ash_admin

A super-admin UI dashboard for Ash Framework applications, built with Phoenix LiveView.
https://hexdocs.pm/ash_admin
MIT License
102 stars 48 forks source link

LiveView asset version mismatch. JavaScript version 0.20.17 vs. server 1.0.0-rc.6. #216

Open user20230119 opened 3 weeks ago

user20230119 commented 3 weeks ago

Describe the bug

Admin content is blank.

admin:7112 LiveView asset version mismatch. JavaScript version 0.20.17 vs. server 1.0.0-rc.6. To avoid issues, please ensure that your assets use the same version as the server.

image

To Reproduce

Install mix igniter.new helpdesk --install ash,ash_postgres --with phx.new --extend postgres --example before adding AshAdmin.

Expected behavior

AshAdmin work with LiveView RC.

Runtime

zachdaniel commented 3 weeks ago

You'll have to use the live_view_1.0 branch until 1.0 of phoenix_live_view is deployed. I'll leave this issue open until then.

user20230119 commented 3 weeks ago

I get an error. Windows does not like colons in filenames. This may be an issue with mix deps.get.

  defp deps do
    [
      {:ash_admin, github: "https://github.com/ash-project/ash_admin.git", branch: "live_view_1.0"},
mix deps.get
* Getting ash_admin (https://github.com/ash-project/ash_admin.git - live_view_1.0)
remote: Enumerating objects: 4935, done.
remote: Counting objects: 100% (1017/1017), done.
remote: Compressing objects: 100% (262/262), done.
remote: Total 4935 (delta 848), reused 853 (delta 745), pack-reused 3918 (from 1)
error: invalid path 'documentation/dsls/DSL:-AshAdmin.Domain.md'
error: invalid path 'documentation/dsls/DSL:-AshAdmin.Resource.md'
** (Mix) Command "git --git-dir=.git checkout --quiet live_view_1.0" failed
zachdaniel commented 3 weeks ago

I've seen this problem before but was never able to reproduce it. Are you on windows?

user20230119 commented 3 weeks ago

I'm on Windows 10.

zachdaniel commented 3 weeks ago

🤔 Yeah, I'm not sure how much I can help with this. Do you get this same error if you clone this repo down directly?

user20230119 commented 3 weeks ago

We could remove the colons from the filenames since Windows does not allow colons in filenames. When I download the zip and extract, the colons are removed from the filenames.

zachdaniel commented 3 weeks ago

🤔 I wonder why thats not happening when it's cloned with git. I also didn't know that windows didn't allow colons in file names. These files are autogenerated docs, so changing them would require changing them in spark. But we can do it if it's actually necessary. Will require updating all of our packages that use it one at a time.

user20230119 commented 3 weeks ago

I could create a fork and manually remove the colons for now.

The error comes from git clone.


> git clone https://github.com/ash-project/ash_admin.git
Cloning into 'ash_admin'...
remote: Enumerating objects: 5153, done.
remote: Counting objects: 100% (917/917), done.
remote: Compressing objects: 100% (282/282), done.
remote: Total 5153 (delta 725), reused 756 (delta 623), pack-reused 4236 (from 1)
Receiving objects: 100% (5153/5153), 3.36 MiB | 11.57 MiB/s, done.
Resolving deltas: 100% (2702/2702), done.
error: invalid path 'documentation/dsls/DSL:-AshAdmin.Domain.md'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
``
zachdaniel commented 3 weeks ago

Right. Okay, please open an issue here: https://github.com/ash-project/spark requesting us to remove the : from the generated DSL docs, and we'll go from there. It will take time to fix them all.

zachdaniel commented 3 weeks ago

Okay, you should now be able to clone the repo.