docs: add troubleshooting section to getting started guide (#196)

This commit is contained in:
Vasilis Spilka 2024-08-16 20:47:43 +02:00 committed by GitHub
parent 5e3acf10e8
commit 463e96c5b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,4 +99,24 @@ This will allow AshAdmin-generated inline CSS and JS blocks to execute normally.
## Troubleshooting
#### UI issues
If your admin UI is not responding as expected, check your browser's developer console for content-security-policy violations (see above).
#### Router issues
If you are seeing the following error `(UndefinedFunctionError) function YourAppWeb.AshAdmin.PageLive.__live__/0 is undefined (module YourAppWeb.AshAdmin.PageLive is not available)` it likely means that you added the ash admin route macro under a scope with a prefix. Make sure that you add it under a scope without any prefixes.
```elixir
# Incorrect (with YourAppWeb prefix)
scope "/", YourAppWeb do
pipe_through [:browser]
ash_admin "/admin"
end
# Correct (without prefix)
scope "/" do
pipe_through [:browser]
ash_admin "/admin"
end
```