I have a a fresh umbrella project with a Phoenix app inside. To create the app I used the following commands:
mix new test_app --umbrella
cd test_app/apps
mix phx.new.web web_interface --no-dashboard --no-ecto --no-gettext --no-mailer
cd web_interface
{Phoenix.PubSub, name: WebInterface.PubSub}
to lib/application.ex
mix setup
mix assets.deploy
iex -S mix phx.server
After this last command I am then greeted with:
> λ iex -S mix phx.server 03:18:31.953 [info] Running
> WebInterface.Endpoint with cowboy 2.10.0 at 127.0.0.1:4000 (http)
> 03:18:32.039 [info] Access WebInterface.Endpoint at
> http://localhost:4000 [watch] build finished, watching for changes...
> Interactive Elixir (1.14.1) - press Ctrl+C to exit (type h() ENTER for help)
> iex(1)> Browserslist: caniuse-lite is outdated. Please run:
> npx update-browserslist-db@latest Why you should do it regularly:
> https://github.com/browserslist/update-db#readme iex(1)> iex(1)>
> Rebuilding... iex(1)> iex(1)> Done in 476ms. iex(1)>
Which outside of the warning for an outdated package, raises nothing to indicate that a step is missing/failed.
However, when I login into localhost:4000
, I see this:
Which clearly means something is wrong.
Why is this happening, and how can I fix it?
It seems tailwind is incorrectly configured within umbrella apps, open up apps/web_interface/assets/tailwind.config.js
and remove the _web
from the content section, e.g.
content: [
"./js/**/*.js",
"../lib/*.ex",
"../lib/**/*.*ex"
],
(edit: related issue https://github.com/phoenixframework/phoenix/issues/5403)