CharlesIrvine
I have a Phoenix/LiveView app that uses Flowbite. Locally, everything renders as expected. However, when I deploy the app to Fly.io, all tailwind styling is absent. I followed the instructions at https://flowbite.com/docs/getting-started/phoenix/#install-flowbite to get Flowbite integrated with my app.
One last thing, when I pull up my app at https://irvine-my-app.fly.dev/ and look in the dev console, I see what is probably indicative of the problem:
app.css:1 Failed to load resource: the server responded with a status of 404 ()
Any ideas on what my problem might be would be much appreciated. Thanks
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
ivanhercaz
It seems that the route to the
app.cssis broken because it is returning a 404 and in your website nothing is loading its style.Could you share the code snippet where you load the
app.css? Check it, because maybe it works nice in your local because you set some path that works there but no with the directory structure in Fly.io.I would inspect your layout, but now I am not in the computer so I can’t check it.
Edit:
Checked, inspecting your website I see:
But https://irvine-my-app.fly.dev/assets/app.css is not there.
Could you confirm if you are getting some error when you deploy it?
CharlesIrvine
See local console out below, but I’m not sure that the logs are complete. I suppose that there might be a way to get logs from Fly.io website, but I haven’t figured that out yet.
I suspect the the problem is due to inaccurate instructions given at the Flowbite website as referenced in my original post. I can see that the instructions are from before the release of Phx 1.7x. All that I did to create the app was:
And nothing else. I strongly suspect that anyone doing the same would reproduce the problem.
CharlesIrvine
Here are the specific Flowbite integration instructions, which seem to work for local deployment but not for Fly.io deployment:
tailwind.config.js:./assets/js/app.jsfile.stevensonmt
what does the assets directory look like after you install flowbite? It’s possible that npm is doing something in the installation that overwrites the whole directory. If you edit the
/assets/app.cssfile in the developer toolbox in a chromium based browser the styling gets applied correctly but the file is blank to start with.CharlesIrvine
The problem was that the node_modules directory wasn’t deployed via the generated docker file, since it was explicitly ignored in the generated .dockerignore file. Once the problem was corrected, assets were correctly deployed and everything was styled correctly.